aboutsummaryrefslogtreecommitdiffstats
path: root/community/gitea/allow-to-set-version.patch
blob: 4be917c84665550916ba7b1e28a81c1c146c315e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- ./Makefile.orig
+++ ./Makefile
@@ -11,7 +11,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//')" -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)