Commit a0d6c4c5 authored by Shawn's avatar Shawn

fix

parent bc8a1da1
...@@ -31,8 +31,10 @@ var ( ...@@ -31,8 +31,10 @@ var (
// VersionWithMeta holds the textual version string including the metadata. // VersionWithMeta holds the textual version string including the metadata.
var VersionWithMeta = func() string { var VersionWithMeta = func() string {
v := version.Version v := version.Version
if GitCommit != "" { if len(GitCommit) >= 8 {
v += "-" + GitCommit[:8] v += "-" + GitCommit[:8]
} else {
v += "-" + GitCommit
} }
if GitDate != "" { if GitDate != "" {
v += "-" + GitDate v += "-" + GitDate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment