summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-04-03 00:10:11 +0800
committertechknowlogick <matti@mdranta.net>2019-04-02 12:10:11 -0400
commit0a8e63c68292a08d8a7bc4fa397ae41235f086a7 (patch)
tree89a1d88237a8aed1d68cb9f951878f72bf95ea07 /Makefile
parent60ba903a57f8ac6f40ba6e10d03f2e23acc7c2c3 (diff)
downloadgitea-0a8e63c68292a08d8a7bc4fa397ae41235f086a7.tar.gz
gitea-0a8e63c68292a08d8a7bc4fa397ae41235f086a7.zip
add make version on gitea version (#6485)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 756a33876c..b8d156b76c 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,8 @@ GOFMT ?= gofmt -s
GOFLAGS := -i -v
EXTRA_GOFLAGS ?=
+MAKE_VERSION := $(shell make -v | head -n 1)
+
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
GITEA_VERSION ?= $(VERSION)
@@ -36,7 +38,7 @@ else
GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
endif
-LDFLAGS := -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
+LDFLAGS := -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)))
SOURCES ?= $(shell find . -name "*.go" -type f)