Stamp app version into builds
ci / lint-test (push) Successful in 1m17s
ci / build (push) Successful in 2m33s

This commit is contained in:
Joe Julian
2026-04-05 23:56:58 -07:00
parent 9aeb98da58
commit 1c72a5009f
9 changed files with 55 additions and 4 deletions
+19
View File
@@ -5517,6 +5517,25 @@ func TestShowAboutSection(t *testing.T) {
}
}
func TestCurrentAppVersion(t *testing.T) {
t.Parallel()
previous := appVersion
t.Cleanup(func() {
appVersion = previous
})
appVersion = ""
if got := currentAppVersion(); got != "dev" {
t.Fatalf("currentAppVersion() with empty version = %q, want dev", got)
}
appVersion = " v0.0.1 "
if got := currentAppVersion(); got != "v0.0.1" {
t.Fatalf("currentAppVersion() with linker version = %q, want v0.0.1", got)
}
}
func TestUIAPIPolicyTargetActionsUseCurrentContext(t *testing.T) {
t.Parallel()