mirror of https://github.com/status-im/consul.git
Simplifies the version formatter.
This commit is contained in:
parent
d982af63fd
commit
40e433358e
|
@ -31,14 +31,13 @@ func GetVersion() string {
|
||||||
release = "dev"
|
release = "dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
fullVersion := fmt.Sprintf("%s", version)
|
|
||||||
if release != "" {
|
if release != "" {
|
||||||
fullVersion += fmt.Sprintf("-%s", release)
|
version += fmt.Sprintf("-%s", release)
|
||||||
if GitCommit != "" {
|
if GitCommit != "" {
|
||||||
fullVersion += fmt.Sprintf(" (%s)", GitCommit)
|
version += fmt.Sprintf(" (%s)", GitCommit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip off any single quotes added by the git information.
|
// Strip off any single quotes added by the git information.
|
||||||
return strings.Replace(fullVersion, "'", "", -1)
|
return strings.Replace(version, "'", "", -1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue