引入 VERSION 作为统一版本源,避免前端、后端、桌面打包和发布资产之间的版本漂移。 新增 tag 驱动的 Draft Release 流程与版本化资产命名,使本地演进和 GitHub 发布共享同一套约束。
18 lines
260 B
Go
18 lines
260 B
Go
package buildinfo
|
|
|
|
import "testing"
|
|
|
|
func TestDefaults(t *testing.T) {
|
|
if Version() == "" {
|
|
t.Fatal("Version() 不应为空")
|
|
}
|
|
|
|
if Commit() == "" {
|
|
t.Fatal("Commit() 不应为空")
|
|
}
|
|
|
|
if BuildTime() == "" {
|
|
t.Fatal("BuildTime() 不应为空")
|
|
}
|
|
}
|