From 376f8a6ed6734aa1b3e929697a376de925352bfd Mon Sep 17 00:00:00 2001 From: Victor Farazdagi Date: Wed, 21 Sep 2016 15:22:42 +0300 Subject: [PATCH] Version bump --- cmd/status/main.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/status/main.go b/cmd/status/main.go index 5f275bf03..fe095412a 100644 --- a/cmd/status/main.go +++ b/cmd/status/main.go @@ -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) }