feat(ci): 服务端 server-v* 编译+release+部署(备份/迁移/回滚,复用 lib-ssh/lib-forgejo)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# compile-backend.sh — cross-compile the pangolin Go control-plane binaries
|
||||
# (server / agent / migrate) for the pangolin1 deploy target. CGO disabled:
|
||||
# modernc.org/sqlite is pure Go, no cgo toolchain needed on the runner.
|
||||
# Output: server/out/{pangolin-server,pangolin-agent,pangolin-migrate}.
|
||||
#
|
||||
# Run inside a golang:1.25 container by .gitea/workflows/deploy-server.yml;
|
||||
# this script itself just runs `go build` and assumes it is invoked from the
|
||||
# repo root.
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck source=scripts/ci/_env.sh
|
||||
. scripts/ci/_env.sh
|
||||
|
||||
cd server
|
||||
mkdir -p out
|
||||
|
||||
echo "==> compile-backend: building pangolin-server"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-server ./cmd/server
|
||||
|
||||
echo "==> compile-backend: building pangolin-agent"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-agent ./cmd/agent
|
||||
|
||||
echo "==> compile-backend: building pangolin-migrate"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-migrate ./cmd/migrate
|
||||
|
||||
echo "==> compile-backend: done — out/ contents:"
|
||||
ls -lh out/
|
||||
Reference in New Issue
Block a user