fix: improve release scripts with .env loading and idempotent publish
Some checks are pending
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions
CI / package (push) Blocked by required conditions

Scripts now auto-load .env for GITEA_TOKEN, handle re-publishing
by deleting existing versions first, and release.sh does build +
publish + install in one command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michal
2026-02-21 14:04:07 +00:00
parent 48fce7fe45
commit e1ed585e2a
4 changed files with 77 additions and 10 deletions

View File

@@ -5,13 +5,17 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_ROOT"
export VERSION="${VERSION:-0.1.0}"
# Load .env if present
if [ -f .env ]; then
set -a; source .env; set +a
fi
echo "==> Building TypeScript..."
pnpm build
echo "==> Bundling standalone binary..."
mkdir -p dist
rm -f dist/mcpctl dist/mcpctl-*.rpm
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl
echo "==> Packaging RPM..."