Skip to content

Commit bac167d

Browse files
authored
Merge pull request #54 from cpanato/update-version
return the git version from the one that is passed from the ldflags due to an issue in upstream
2 parents 7d7a550 + 375178a commit bac167d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

version/version.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ func getGitVersion(bi *debug.BuildInfo) string {
8484
if bi == nil {
8585
return unknown
8686
}
87+
88+
// TODO: remove this when the issue https://github.com/golang/go/issues/29228 is fixed
89+
if bi.Main.Version == "(devel)" || bi.Main.Version == "" {
90+
return gitVersion
91+
}
92+
8793
return bi.Main.Version
8894
}
8995

0 commit comments

Comments
 (0)