blob: d5f609ebb34be6c66b33f702cce011847b5a65fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- 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)
|