PKGBUILDs/community/consul/fix-build-version-info.patch

36 lines
849 B
Diff
Raw Normal View History

2018-06-26 12:54:12 +00:00
--- a/version/version.go 2018-06-26 09:57:33.703932696 +0200
+++ b/version/version.go 2018-06-26 09:59:05.986536238 +0200
@@ -1,7 +1,6 @@
package version
import (
- "fmt"
"strings"
)
@@ -27,24 +26,6 @@ var (
// for displaying to humans.
func GetHumanVersion() string {
version := Version
- if GitDescribe != "" {
- version = GitDescribe
- }
-
- release := VersionPrerelease
- if GitDescribe == "" && release == "" {
- release = "dev"
- }
-
- if 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)
- }
- }
// Strip off any single quotes added by the git information.
return strings.Replace(version, "'", "", -1)