Make the version within makefile overwriteable (#6080)

Fix #1173
release/v1.9
techknowlogick 5 years ago committed by GitHub
parent 0b94f106f8
commit d10a668ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,14 +25,14 @@ EXTRA_GOFLAGS ?=
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
GITEA_VERSION := $(VERSION)
GITEA_VERSION ?= $(VERSION)
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
else
VERSION ?= master
endif
GITEA_VERSION := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
endif
LDFLAGS := -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"

Loading…
Cancel
Save