diff options
author | Sandro Santilli <strk@kbt.io> | 2017-04-06 17:32:28 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-04-06 23:32:28 +0800 |
commit | 410af6971b87ac5dc7ac198f538d8383c1f47a1f (patch) | |
tree | 727766cf5e449518b9091bc508af345358f1b3f8 /Makefile | |
parent | a78a0266c4121ecc008620d7733bb6cfd7ec64e9 (diff) | |
download | gitea-410af6971b87ac5dc7ac198f538d8383c1f47a1f.tar.gz gitea-410af6971b87ac5dc7ac198f538d8383c1f47a1f.zip |
Set VERSION from git once, in a variable (#1447)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -14,7 +14,9 @@ JAVASCRIPTS := GOFLAGS := -i -v EXTRA_GOFLAGS ?= -LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)" +VERSION := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') + +LDFLAGS := -X "main.Version=$(VERSION)" -X "main.Tags=$(TAGS)" PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/)) SOURCES ?= $(shell find . -name "*.go" -type f) |