Skip to content

Commit 410af69

Browse files
strkappleboy
authored andcommitted
Set VERSION from git once, in a variable (#1447)
1 parent a78a026 commit 410af69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ JAVASCRIPTS :=
1414
GOFLAGS := -i -v
1515
EXTRA_GOFLAGS ?=
1616

17-
LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)"
17+
VERSION := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
18+
19+
LDFLAGS := -X "main.Version=$(VERSION)" -X "main.Tags=$(TAGS)"
1820

1921
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/))
2022
SOURCES ?= $(shell find . -name "*.go" -type f)

0 commit comments

Comments
 (0)