2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-27 17:43:27 +00:00
bazel-lib/tools/common/version.go
2023-01-15 12:17:30 -08:00

17 lines
368 B
Go

package common
import "strings"
func Version() string {
var versionBuilder strings.Builder
if Release != "" && Release != PreStampRelease {
versionBuilder.WriteString(Release)
if GitStatus != CleanGitStatus {
versionBuilder.WriteString(NotCleanVersionSuffix)
}
} else {
versionBuilder.WriteString(NoReleaseVersion)
}
return versionBuilder.String()
}