fix: improve release scripts with .env loading and idempotent publish
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:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user