chore(publish): release.sh 校验线上 latest.json + 文档写清两个发布脚本的分工
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 33s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 33s
This commit is contained in:
1 parent
7a3d268f73
commit
ccde6a8ad4
2 files changed
+22
No files matched your search
@@ -66,6 +66,18 @@ scp -i "$SSH_KEY" -o BatchMode=yes site/download/index.html "${NAS_USER}@${NAS_H
|
||||
scp -i "$SSH_KEY" -o BatchMode=yes site/plugins/index.html "${NAS_USER}@${NAS_HOST}:$NAS_DIR/plugins/" >/dev/null
|
||||
ssh -i "$SSH_KEY" -o BatchMode=yes "${NAS_USER}@${NAS_HOST}" "chmod -R a+rX $NAS_DIR"
|
||||
|
||||
# 2026-11-30 教训:release.sh 只更新 releases.json/站点,**不写 updater 的 latest.json**。
|
||||
# 只跑它就发版,客户端「检查更新」永远看到旧版本(实测 108 卡在旧版一周)。
|
||||
# 这里在收尾时校验线上 latest.json,不一致就显式告警,避免静默漏发。
|
||||
LATEST_VER=$(curl -s -m 20 https://download.maqiart.eu.org/updates/latest.json | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{console.log(JSON.parse(s).version||"")}catch(e){console.log("")}})' || true)
|
||||
if [ "$LATEST_VER" != "$VERSION" ]; then
|
||||
echo ""
|
||||
echo "⚠⚠ 线上 latest.json 仍是 ${LATEST_VER:-未知},而本次发布是 $VERSION"
|
||||
echo " 客户端「检查更新」会看不到本次版本。请再执行:bash scripts/publish-update.sh"
|
||||
echo " (它会双架构构建 app.tar.gz + 签名 + 写 latest.json;dmg/站点本脚本已处理)"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "→ 校验公网"
|
||||
# 包是 8~9 MB,走隧道回读要几十秒:超时给短了 curl 直接非零退出,
|
||||
# set -e 下会「无声退出」,看起来像发布成功(v3.25.23 真实发生)。
|
||||
|
||||
Reference in new issue
Block a user