fix: prefer ldflags version over build info

Amolith created

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 <crush@charm.land>

Change summary

main.go | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Detailed changes

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