chore: semver-compliant version for dev and nightly builds (#32663)
This commit is contained in:
parent
c1fac30171
commit
09c2ce3055
14 changed files with 103 additions and 64 deletions
|
|
@ -1,9 +1,6 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
import "runtime"
|
||||
|
||||
const DevVersion = "0.0.0"
|
||||
|
||||
|
|
@ -15,10 +12,8 @@ var (
|
|||
Commit = ""
|
||||
)
|
||||
|
||||
// FormattedVersion returns the version, untagged builds carry the commit as build metadata
|
||||
func FormattedVersion() string {
|
||||
if Commit != "" {
|
||||
return fmt.Sprintf("%s (%s)", Version, Commit)
|
||||
}
|
||||
return Version
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue