Skip to content

Commit

Permalink
Make the version within makefile overwriteable (#6080)
Browse files Browse the repository at this point in the history
Fix #1173
  • Loading branch information
techknowlogick committed Mar 19, 2019
1 parent 0b94f10 commit d10a668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -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)"
Expand Down

0 comments on commit d10a668

Please sign in to comment.