aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gitea/allow-to-set-version.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/gitea/allow-to-set-version.patch')
-rw-r--r--testing/gitea/allow-to-set-version.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/gitea/allow-to-set-version.patch b/testing/gitea/allow-to-set-version.patch
new file mode 100644
index 0000000000..3e698d787a
--- /dev/null
+++ b/testing/gitea/allow-to-set-version.patch
@@ -0,0 +1,15 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -6,7 +6,11 @@
+ STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
+ JAVASCRIPTS :=
+
+-LDFLAGS += -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')"
++ifeq ($(origin VERSION), undefined)
++ VERSION=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
++endif
++
++LDFLAGS += -X "main.Version=$(VERSION)"
+
+ TARGETS ?= linux/*,darwin/*,windows/*
+ PACKAGES ?= $(shell go list ./... | grep -v /vendor/)