Files
mcpctl/scripts/release.sh
Michal 6e84631d59
All checks were successful
CI/CD / typecheck (push) Successful in 48s
CI/CD / test (push) Successful in 59s
CI/CD / lint (push) Successful in 2m8s
CI/CD / build (push) Successful in 3m49s
CI/CD / publish-rpm (push) Successful in 38s
CI/CD / publish-deb (push) Successful in 23s
CI/CD / smoke (push) Successful in 8m23s
fix: use public URL (mysources.co.uk) for package install instructions
Internal API calls still use 10.0.0.194:3012, but all user-facing
install instructions now use the public GITEA_PUBLIC_URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 09:47:38 +00:00

64 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_ROOT"
# Load .env if present
if [ -f .env ]; then
set -a; source .env; set +a
fi
echo "=== mcpctl release ==="
echo ""
# Build
bash scripts/build-rpm.sh
echo ""
# Publish
bash scripts/publish-rpm.sh
bash scripts/publish-deb.sh
echo ""
# Install locally
echo "==> Installing locally..."
RPM_FILE=$(ls dist/mcpctl-*.rpm 2>/dev/null | head -1)
sudo rpm -U --force "$RPM_FILE"
echo ""
echo "==> Installed:"
mcpctl --version
echo ""
# Restart mcplocal so smoke tests run against the new binary
echo "==> Restarting mcplocal..."
systemctl --user restart mcplocal
sleep 2
# Run smoke tests (requires live mcplocal + mcpd)
echo "==> Running smoke tests..."
export PATH="$HOME/.npm-global/bin:$PATH"
if pnpm test:smoke; then
echo "==> Smoke tests passed!"
else
echo "==> WARNING: Smoke tests failed! Check mcplocal/mcpd are running."
echo " Continuing anyway — deployment is complete, but verify manually."
fi
echo ""
GITEA_PUBLIC_URL="${GITEA_PUBLIC_URL:-https://mysources.co.uk}"
GITEA_OWNER="${GITEA_OWNER:-michal}"
echo "=== Done! ==="
echo "RPM install:"
echo " sudo dnf config-manager --add-repo ${GITEA_PUBLIC_URL}/api/packages/${GITEA_OWNER}/rpm.repo"
echo " sudo dnf install mcpctl"
echo ""
echo "DEB install (Debian/Ubuntu):"
echo " echo \"deb ${GITEA_PUBLIC_URL}/api/packages/${GITEA_OWNER}/debian trixie main\" | sudo tee /etc/apt/sources.list.d/mcpctl.list"
echo " curl -fsSL ${GITEA_PUBLIC_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | sudo gpg --dearmor -o /etc/apt/keyrings/mcpctl.gpg"
echo " sudo apt update && sudo apt install mcpctl"