aur.open-consul/fix-build-version-info.patch

76 lines
2.5 KiB
Diff

--- 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)
--- a/GNUmakefile 2020-02-20 16:40:00.000000000 +0100
+++ b/GNUmakefile 2020-03-04 09:48:52.279500949 +0100
@@ -16,13 +16,7 @@ GOPATH=$(shell go env GOPATH)
MAIN_GOPATH=$(shell go env GOPATH | cut -d: -f1)
ASSETFS_PATH?=agent/bindata_assetfs.go
-# Get the git commit
-GIT_COMMIT?=$(shell git rev-parse --short HEAD)
-GIT_COMMIT_YEAR?=$(shell git show -s --format=%cd --date=format:%Y HEAD)
-GIT_DIRTY?=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
-GIT_DESCRIBE?=$(shell git describe --tags --always --match "v*")
-GIT_IMPORT=github.com/hashicorp/consul/version
-GOLDFLAGS=-X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) -X $(GIT_IMPORT).GitDescribe=$(GIT_DESCRIBE)
+GOLDFLAGS=
PROTOFILES?=$(shell find . -name '*.proto' | grep -v 'vendor/')
PROTOGOFILES=$(PROTOFILES:.proto=.pb.go)
@@ -348,16 +342,6 @@ tools:
fi
cd .gotools && go get -v $(GOTOOLS)
-version:
- @echo -n "Version: "
- @$(SHELL) $(CURDIR)/build-support/scripts/version.sh
- @echo -n "Version + release: "
- @$(SHELL) $(CURDIR)/build-support/scripts/version.sh -r
- @echo -n "Version + git: "
- @$(SHELL) $(CURDIR)/build-support/scripts/version.sh -g
- @echo -n "Version + release + git: "
- @$(SHELL) $(CURDIR)/build-support/scripts/version.sh -r -g
-
docker-images: go-build-image ui-build-image
@@ -409,4 +393,4 @@ proto: $(PROTOGOFILES) $(PROTOGOBINFILES
.PHONY: all ci bin dev dist cov test test-ci test-internal cover format vet ui static-assets tools
.PHONY: docker-images go-build-image ui-build-image static-assets-docker consul-docker ui-docker
-.PHONY: version proto proto-rebuild proto-delete test-envoy-integ
+.PHONY: proto proto-rebuild proto-delete test-envoy-integ