2019-08-10 21:31:22 +00:00
|
|
|
package version
|
|
|
|
|
|
|
|
var buildName string
|
|
|
|
var buildVersion string
|
|
|
|
|
|
|
|
// BuildName gets the current build name. This is usually injected if built
|
|
|
|
// from git, or returns "unknown" otherwise.
|
|
|
|
func BuildName() string {
|
|
|
|
if buildName == "" {
|
2019-11-11 05:24:50 +00:00
|
|
|
return "unknown"
|
2019-08-10 21:31:22 +00:00
|
|
|
}
|
|
|
|
return buildName
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildVersion gets the current build version. This is usually injected if
|
|
|
|
// built from git, or returns "unknown" otherwise.
|
|
|
|
func BuildVersion() string {
|
|
|
|
if buildVersion == "" {
|
|
|
|
return "unknown"
|
|
|
|
}
|
|
|
|
return buildVersion
|
|
|
|
}
|