2b4350cfc4
main.go 挂载 notices.Store/Handler:注入 rewardSvc/payWebhook 到账通知钩子, /v1/notices 路由由 accountAPI 空壳换成真实 List/MarkRead,删除 account.go 的 TODO 空壳方法。补齐 pangolin-nodectl 到编译/部署产物链 (compile-backend.sh + deploy-server.sh),release-client.sh 在 version.yaml 推送成功后追加一步用 nodectl 插入 version 类型站内公告 (失败不阻断发版)。
33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
# compile-backend.sh — cross-compile the pangolin Go control-plane binaries
|
|
# (server / agent / migrate / nodectl) 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,pangolin-nodectl}.
|
|
#
|
|
# 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: building pangolin-nodectl"
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-nodectl ./cmd/nodectl
|
|
|
|
echo "==> compile-backend: done — out/ contents:"
|
|
ls -lh out/
|