community/consul: fix

This commit is contained in:
Kevin Mihelich 2018-06-26 12:54:12 +00:00
parent 5856c973f8
commit 860c2b9d1b
2 changed files with 35 additions and 11 deletions

View file

@ -0,0 +1,35 @@
--- 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)

View file

@ -1,11 +0,0 @@
--- a/GNUmakefile 2018-05-22 13:25:37.236071564 +0200
+++ b/GNUmakefile 2018-05-22 13:26:44.852192711 +0200
@@ -58,7 +58,7 @@
# linux builds a linux package independent of the source platform
linux:
mkdir -p pkg/linux_amd64/
- GOOS=linux GOARCH=amd64 go build -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)' -o pkg/linux_amd64/consul
+ GOOS=linux GOARCH=amd64 go build -buildmode=pie -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)' -o pkg/linux_amd64/consul
# dist builds binaries for all platforms and packages them for distribution
dist: