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