feat(server): 装配 notices(路由替换空壳+reward/pay 注入)+ 发版联动插 version 公告

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 类型站内公告
(失败不阻断发版)。
This commit is contained in:
wangjia
2026-07-13 14:09:54 +08:00
parent 78fd600522
commit 2b4350cfc4
5 changed files with 33 additions and 19 deletions
+9
View File
@@ -103,6 +103,15 @@ if [ -f "$MANIFEST_TMPL" ]; then
$SCP "$MANIFEST_OUT" "root@${DEPLOY_HOST}:/tmp/pangolin_version.yaml.new"
$SSH "root@${DEPLOY_HOST}" "mv /tmp/pangolin_version.yaml.new /etc/pangolin/version.yaml && chown pangolin:pangolin /etc/pangolin/version.yaml && chmod 644 /etc/pangolin/version.yaml"
echo "==> release-client: version.yaml deployed to pangolin1 (/etc/pangolin/version.yaml)"
# 站内通知:插一条 version 类型公告,提示用户有新版可更新。失败不阻断发版
# (公告只是锦上添花,manifest 已经推送成功才是自动更新真正生效的部分)。
echo "==> release-client: inserting version notice via pangolin-nodectl"
$SSH "root@${DEPLOY_HOST}" "DB_DSN=/var/lib/pangolin/pangolin.db DB_DRIVER=sqlite \
/usr/local/bin/pangolin-nodectl notice add --type version \
--title-zh \"v${VER} 已发布\" --title-en \"v${VER} released\" \
--body-zh \"新版本已可更新,打开设置检查更新。\" --body-en \"A new version is available — check for updates in Settings.\"" \
|| echo "==> release-client: version notice 插入失败(不阻断发版)"
else
echo "==> release-client: DEPLOY_SSH_KEY not set — skipping live manifest push (dist/version.yaml still staged + uploaded as a release asset)"
fi