feat: add RPM packaging with nfpm and Gitea registry publishing
Bundles the CLI into a standalone binary via bun compile, packages as RPM with nfpm, and publishes to Gitea's built-in package registry. Users install with: dnf config-manager --add-repo <gitea>/rpm.repo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
scripts/build-rpm.sh
Executable file
23
scripts/build-rpm.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
export VERSION="${VERSION:-0.1.0}"
|
||||
|
||||
echo "==> Building TypeScript..."
|
||||
pnpm build
|
||||
|
||||
echo "==> Bundling standalone binary..."
|
||||
mkdir -p dist
|
||||
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl
|
||||
|
||||
echo "==> Packaging RPM..."
|
||||
nfpm pkg --packager rpm --target dist/
|
||||
|
||||
RPM_FILE=$(ls dist/mcpctl-*.rpm 2>/dev/null | head -1)
|
||||
echo "==> Built: $RPM_FILE"
|
||||
echo " Size: $(du -h "$RPM_FILE" | cut -f1)"
|
||||
rpm -qpi "$RPM_FILE"
|
||||
Reference in New Issue
Block a user