diff options
Diffstat (limited to 'params/version.go')
-rw-r--r-- | params/version.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/params/version.go b/params/version.go index fef360473..6a0eb3506 100644 --- a/params/version.go +++ b/params/version.go @@ -16,7 +16,9 @@ package params -import "fmt" +import ( + "fmt" +) const ( VersionMajor = 1 // Major version component of the current release @@ -33,3 +35,11 @@ var Version = func() string { } return v }() + +func VersionWithCommit(gitCommit string) string { + vsn := Version + if len(gitCommit) >= 8 { + vsn += "-" + gitCommit[:8] + } + return vsn +} |