aports/community/gitea/allow-to-set-version.patch
2017-11-07 14:56:27 +00:00

16 lines
535 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,11 @@
GOFLAGS := -i -v
EXTRA_GOFLAGS ?=
-LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)"
+ifeq ($(origin VERSION), undefined)
+ VERSION=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
+endif
+
+LDFLAGS += -X "main.Version=$(VERSION)"
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/))
SOURCES ?= $(shell find . -name "*.go" -type f)