mirror of https://github.com/status-im/consul.git
Dont duplicate release versions in prereleases
This commit is contained in:
parent
3e8b7f3f38
commit
60ee47ea11
|
@ -35,8 +35,12 @@ func GetHumanVersion() string {
|
|||
if GitDescribe == "" && release == "" {
|
||||
release = "dev"
|
||||
}
|
||||
|
||||
if release != "" {
|
||||
version += fmt.Sprintf("-%s", release)
|
||||
if !strings.HasSuffix(version, "-"+release) {
|
||||
// if we tagged a prerelease version then the release is in the version already
|
||||
version += fmt.Sprintf("-%s", release)
|
||||
}
|
||||
if GitCommit != "" {
|
||||
version += fmt.Sprintf(" (%s)", GitCommit)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue