1
0

feat: 迁移 versionctl 为独立模块并新增 make version-bump 命令

- 将 backend/cmd/versionctl 和 backend/pkg/projectversion 迁移至独立 versionctl/ Go 模块
- 新增 bump 子命令支持 major/minor/patch 和指定版本号,含版本倒退防护
- 新增 make version-bump 编排完整升迁流程(bump + sync + check + commit + tag)
- 更新所有引用路径:根 Makefile、backend/Makefile、release.yml、.golangci.yml
- 新增 versionctl/.golangci.yml(精简配置)和 Makefile(lint/test/coverage)
- 根 Makefile lint/test 集成 versionctl 模块
- 同步 openspec specs:新增 version-bump spec,更新 release-pipeline spec
This commit is contained in:
2026-05-05 04:18:10 +08:00
parent 3cd0458c2c
commit bc7a7c6e81
16 changed files with 515 additions and 47 deletions

View File

@@ -321,27 +321,24 @@ make desktop-clean # 清理 desktop 产物
### 本地版本演进
1. 手工修改根目录 `VERSION` 为新的 `x.y.z`
2. 同步镜像文件:
```bash
# 递增版本(自动 sync + check + commit + tag
make version-bump BUMP=minor
# 或指定具体版本号
make version-bump SET_VERSION=1.0.0
# 推送到远程
git push --follow-tags
```
手动同步和校验:
```bash
make version-sync
```
3. 校验版本一致性:
```bash
make version-check
```
4. 提交版本变更后,创建发布 tag
```bash
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin main
git push origin vX.Y.Z
```
### 本地生成发布资产
```bash