chore(scripts): remove obsolete scripts

This commit is contained in:
Ivan
2026-04-08 03:17:33 -05:00
parent 2f7cec32ce
commit f2d97115c7
5 changed files with 0 additions and 181 deletions
-38
View File
@@ -1,38 +0,0 @@
#!/bin/sh
# Clone and checkout using Gitea Actions environment variables.
# Source: self-contained, no third-party dependencies.
#
# Usage: checkout.sh [fetch_depth]
# fetch_depth: number of commits (default 1), or 0 for full history.
#
# Required env: GITEA_SERVER_URL, GITEA_REPOSITORY, GITHUB_SHA
# Optional env: GITEA_TOKEN (for private repos), GITHUB_WORKSPACE
set -eu
FETCH_DEPTH="${1:-1}"
SERVER="${GITEA_SERVER_URL:-${GITHUB_SERVER_URL:?GITEA_SERVER_URL not set}}"
REPO="${GITEA_REPOSITORY:-${GITHUB_REPOSITORY:?GITEA_REPOSITORY not set}}"
SHA="${GITHUB_SHA:?GITHUB_SHA not set}"
TOKEN="${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
WORKSPACE="${GITHUB_WORKSPACE:-.}"
cd "$WORKSPACE"
if [ -n "$TOKEN" ]; then
git config --global credential.helper \
"!f() { echo username=x-access-token; echo \"password=${TOKEN}\"; }; f"
fi
ORIGIN="${SERVER}/${REPO}.git"
if [ "$FETCH_DEPTH" = "0" ]; then
git clone -q "$ORIGIN" .
else
git init -q
git remote add origin "$ORIGIN"
git fetch -q --depth="$FETCH_DEPTH" origin "$SHA"
fi
git checkout -q "$SHA" 2>/dev/null || git checkout -q FETCH_HEAD
echo "Checked out ${REPO} at $(git rev-parse --short HEAD)"
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
# Generate SHA256 checksums for release assets
# Usage: ./scripts/gen_checksums.sh [directory]
TARGET_DIR=${1:-"./dist"}
if [ ! -d "$TARGET_DIR" ]; then
echo "Error: Directory $TARGET_DIR does not exist."
exit 1
fi
echo "Generating SHA256SUMS for assets in $TARGET_DIR..."
cd "$TARGET_DIR" || exit 1
# Exclude existing SHA256SUMS file if it exists
find . -maxdepth 1 -type f ! -name "SHA256SUMS" -exec sha256sum {} + > SHA256SUMS
echo "Done. SHA256SUMS created in $TARGET_DIR"
cat SHA256SUMS
-28
View File
@@ -1,28 +0,0 @@
import shutil
from pathlib import Path
TARGET = Path("meshchatx") / "public"
if not Path("pyproject.toml").exists():
msg = "Must run from project root"
raise RuntimeError(msg)
if TARGET.exists():
if TARGET.is_symlink():
msg = f"{TARGET} is a symlink, refusing to remove"
raise RuntimeError(msg)
shutil.rmtree(TARGET)
TARGET.mkdir(parents=True, exist_ok=True)
# Copy built assets from root public/ to meshchatx/public/
SOURCE = Path("public")
if SOURCE.exists():
print(f"Copying assets from {SOURCE} to {TARGET}...")
for item in SOURCE.iterdir():
if item.is_dir():
shutil.copytree(item, TARGET / item.name, dirs_exist_ok=True)
else:
shutil.copy2(item, TARGET / item.name)
else:
print(f"Warning: Source directory {SOURCE} not found!")
-21
View File
@@ -1,21 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob
patterns=(
"dist/*-win-installer.exe"
"dist/*-win-portable.exe"
"dist/*-linux.AppImage"
"dist/*-linux.deb"
)
for pattern in "${patterns[@]}"; do
for f in $pattern; do
dir=$(dirname "$f")
base=$(basename "$f")
ext="${base##*.}"
name="${base%.$ext}"
mv "$f" "$dir/${name}-legacy.${ext}"
done
done
-74
View File
@@ -1,74 +0,0 @@
#!/bin/bash
set -e
# Find wheel file dynamically
WHEEL_PATTERN="python-dist/reticulum_meshchatx-*-py3-none-any.whl"
WHEEL_FILES=($WHEEL_PATTERN)
if [ ${#WHEEL_FILES[@]} -eq 0 ]; then
echo "Error: No wheel files found matching pattern: $WHEEL_PATTERN"
echo "Make sure to run 'poetry build' or similar to create the wheel first."
exit 1
elif [ ${#WHEEL_FILES[@]} -gt 1 ]; then
echo "Error: Multiple wheel files found:"
printf ' %s\n' "${WHEEL_FILES[@]}"
echo "Please clean up old wheels or specify which one to use."
exit 1
fi
WHEEL_PATH="${WHEEL_FILES[0]}"
if [ ! -f "$WHEEL_PATH" ]; then
echo "Error: Wheel not found at $WHEEL_PATH"
exit 1
fi
echo "Found wheel: $WHEEL_PATH"
echo "Creating test virtual environment..."
TEST_VENV=$(mktemp -d)/test-venv
python3 -m venv "$TEST_VENV"
echo "Installing wheel..."
"$TEST_VENV/bin/pip" install --upgrade pip
"$TEST_VENV/bin/pip" install "$WHEEL_PATH"
echo ""
echo "Checking installation..."
"$TEST_VENV/bin/python" << 'PYTHON_SCRIPT'
import meshchatx.meshchat as meshchat
import os
from pathlib import Path
# Check if meshchat module is importable
print(f'meshchat module location: {meshchat.__file__}')
# Check if public directory exists
meshchat_dir = os.path.dirname(meshchat.__file__)
public_path = os.path.join(meshchat_dir, 'public')
print(f'Checking for public at: {public_path}')
print(f'Exists: {os.path.exists(public_path)}')
# Try get_file_path
from meshchatx.meshchat import get_file_path
test_path = get_file_path('public')
print(f'get_file_path("public"): {test_path}')
print(f'Exists: {os.path.exists(test_path)}')
if os.path.exists(test_path):
index_html = os.path.join(test_path, 'index.html')
print(f'index.html exists: {os.path.exists(index_html)}')
else:
print('WARNING: public directory not found!')
print('Checking parent directories...')
current = meshchat_dir
for i in range(3):
test = os.path.join(current, 'public')
print(f' {test}: {os.path.exists(test)}')
current = os.path.dirname(current)
PYTHON_SCRIPT
echo ""
echo "Test complete. Virtual environment at: $TEST_VENV"
echo "To test running meshchat: $TEST_VENV/bin/meshchat --help"