Update version string

Only add the commit hash to the version string if the AppVersion is set
to canary. See #997

Signed-off-by: Luke Mallon (Nalum) <luke@mallon.io>
This commit is contained in:
Luke Mallon (Nalum) 2018-10-27 16:46:55 +01:00
parent d8e652c48e
commit c4fc6d7373
No known key found for this signature in database
GPG Key ID: 893841A3E2C4D6F5

View File

@ -18,6 +18,7 @@ package util
import "fmt"
// This variable block holds information used to build up the version string
var (
AppGitState = ""
AppGitCommit = ""
@ -26,7 +27,7 @@ var (
func version() string {
v := AppVersion
if AppGitCommit != "" {
if AppVersion == "canary" && AppGitCommit != "" {
v += "-" + AppGitCommit
}
if AppGitState != "" {