You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where in fact Version defaults "(devel)" if Go compiler cannot read git info during build, which is the case when building from the downloaded source tarball.
You can try that in playground, where there is also no git info present: https://go.dev/play/p/MCLXd4QaUru
Because of this the version set via Go ldflags is always overrwritten and never used/returned by GetVersion*() functions.
In
It was noted, that the
--version
test failed withExpected /Task\ version:\ 3\.38\.0/ to match "Task version: (devel) ()\n
Meaning that the test was expecting
Task version: 3.38.0
buttask --version
returnedTask version: (devel) ()\n
Even if the correct version was passed to the compiler in ldflags.
Bug introduced with
Where it was assumed that the version would be empty by default:
task/internal/version/version.go
Lines 13 to 21 in 88b0950
Where in fact
Version
defaults "(devel)" if Go compiler cannot read git info during build, which is the case when building from the downloaded source tarball.You can try that in playground, where there is also no git info present: https://go.dev/play/p/MCLXd4QaUru
Because of this the version set via Go
ldflags
is always overrwritten and never used/returned byGetVersion*()
functions.This is the reason for
The text was updated successfully, but these errors were encountered: