细化 AGC 发布文档:区分 build 与 release:upload 的校验范围
Project CI / Repository checks (pull_request) Failing after 15m25s
Project CI / Frontend tests (pull_request) Successful in 21m16s
Project CI / Backend tests (pull_request) Failing after 1h45m38s
Project CI / Native shell tests (pull_request) Failing after 1h50m38s

- build 只校验五个版本来源一致;release:upload 在上传前额外校验版本已提交与防降级
This commit is contained in:
2026-09-07 14:10:13 +08:00
parent 64b9ccfb9d
commit 65012e89b6
@@ -62,14 +62,14 @@ npm run ai-game-creator-shell:bump-version -- --version 0.1.25 --commit
**不会重复递增**。提交前若检测到**除版本文件外的其他已暂存改动**,会中止并提示先处理,避免误提交无关内容。
提交标题固定为“提升 AGC 版本至 x.y.z”。
**发布只读仓库版本(`npm run ai-game-creator-shell:build` 与 `release:upload`**
**构建/发布只读仓库版本(`npm run ai-game-creator-shell:build` 与 `release:upload`**
构建/发布不再改写版本文件,而是读取仓库已提交版本,并在发布前做两件事:
构建发布不再改写版本文件,而是读取仓库版本。前者只校验五个版本来源一致(不一致会中止,
防止漂移);后者(`release:upload`)在上传前还会做两道校验:
1. 校验五个版本来源一致,不一致会中止,防止漂移。
2. 校验版本相对 `HEAD` 已提交(`assertVersionCommitted`):若版本文件存在未提交改动会中止,
1. 校验版本相对 `HEAD` 已提交(`assertVersionCommitted`):若版本文件存在未提交改动会中止,
确保本地发布与 Jenkins 检出的是同一个版本。
3. 通过 `assertVersionNotBelowOss` 读取 OSS `latest.json`:若仓库版本**低于**线上版本会中止,
2. 通过 `assertVersionNotBelowOss` 读取 OSS `latest.json`:若仓库版本**低于**线上版本会中止,
并提示先运行 `bump-version`,避免回退线上版本;OSS 读取失败或清单格式错误同样会中止。
仓库版本等于或高于线上版本才放行。