Skip to content

Commit 3841e39

Browse files
committed
[ci] fix build version injection
1 parent a82c7d2 commit 3841e39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build/build.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
)
77

88
var (
9-
buildVersion = "0.0.0-dev"
10-
BuildVersion = buildVersion
11-
BuildDate = "n/a"
12-
CommitHash = "n/a"
9+
devBuildVersion = "0.0.0-dev"
10+
BuildVersion = "0.0.0-dev"
11+
BuildDate = "n/a"
12+
CommitHash = "n/a"
1313
)
1414

1515
// IsDev returns true if the build is a development build.
@@ -19,10 +19,10 @@ func IsDev() bool {
1919

2020
// Version returns the version string in the format of "vX.Y.Z (<commit>), built <date>".
2121
func Version() string {
22-
if BuildVersion == buildVersion {
22+
if BuildVersion == devBuildVersion {
2323
return BuildVersion
2424
}
25-
return fmt.Sprintf("v%s (%s), built %s", BuildVersion, CommitHash, BuildDate)
25+
return fmt.Sprintf("%s (%s), built %s", BuildVersion, CommitHash, BuildDate)
2626
}
2727

2828
// UserAgent returns the user agent string.

0 commit comments

Comments
 (0)