From efa864502c3c8da0925de013a469ff7d0673fd7b Mon Sep 17 00:00:00 2001 From: Amolith Date: Fri, 26 Dec 2025 10:51:25 -0700 Subject: [PATCH] fix: prefer ldflags version over build info Build info pseudo-versions (v0.1.0-rc.4.0.20251226...) were overriding the nicer git-describe format injected via ldflags. Assisted-by: Claude Sonnet 4 via Crush --- main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 2c40f4931ba46c422d00be124de282596f05cba7..79240ed27ced80769c33e3ce2d566ae8c64d38a8 100644 --- a/main.go +++ b/main.go @@ -23,9 +23,13 @@ func main() { } } -// resolveVersion returns the version from build info (go install) if available, -// otherwise falls back to the ldflags-injected version (release builds). +// resolveVersion returns the ldflags-injected version if set (release builds, +// task install), otherwise falls back to build info (go install from proxy). func resolveVersion() string { + if version != "dev" { + return version + } + info, ok := debug.ReadBuildInfo() if ok && info.Main.Version != "" && info.Main.Version != "(devel)" { return info.Main.Version