fix(ci): 修复版本注入和CI触发配置

- goreleaser ldflags 指向正确的包路径 common.version/commit/date
- version 改为 var 支持 ldflags 注入,banner 显示 commit 和构建日期
- test-build 触发分支增加 dev-* 通配
This commit is contained in:
ZacharyZcR
2026-04-25 08:19:08 +08:00
parent 25e66a68a0
commit 1144ee8b21
4 changed files with 16 additions and 7 deletions
+6 -1
View File
@@ -60,7 +60,12 @@ const (
LogLevelBaseInfoSuccess = "base,info,success"
)
const version = "2.1.1"
// 版本信息,通过 ldflags 注入
var (
version = "2.1.1"
commit = "unknown"
date = "unknown"
)
// 运行时数据已迁移到Config对象中,使用GetGlobalConfig()访问