Version bump

This commit is contained in:
Victor Farazdagi 2016-09-21 15:22:42 +03:00
parent 3a54835c09
commit 376f8a6ed6
1 changed files with 13 additions and 1 deletions

View File

@ -7,8 +7,20 @@ import (
var (
gitCommit = "rely on linker: -ldflags -X main.GitCommit"
buildStamp = "rely on linker: -ldflags -X main.buildStamp"
versionMajor = 0 // Major version component of the current release
versionMinor = 9 // Minor version component of the current release
versionPatch = 0 // Patch version component of the current release
versionMeta = "unstable" // Version metadata to append to the version string
)
func main() {
fmt.Printf("Status\nGit Commit: %s\nBuild Time: %s\n", gitCommit, buildStamp)
verString := fmt.Sprintf("%d.%d.%d", versionMajor, versionMinor, versionPatch)
if versionMeta != "" {
verString += "-" + versionMeta
}
if gitCommit != "" {
verString += "-" + gitCommit[:8]
}
fmt.Printf("Status\nGit Commit: %s\nBuild Time: %s\nVersion: %s\n", gitCommit, buildStamp, verString)
}