updated makefile to build versions with git ref
This commit is contained in:
parent
0404848be2
commit
f8690081ec
6
Makefile
6
Makefile
|
@ -1,12 +1,12 @@
|
|||
GIT_LAST_COMMIT := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
||||
|
||||
ifneq ($(DRONE_TAG),)
|
||||
VERSION ?= $(subst v,,$(DRONE_TAG))
|
||||
VERSION ?= $(subst v,,$(DRONE_TAG))-$(GIT_LAST_COMMIT)
|
||||
else
|
||||
ifneq ($(DRONE_BRANCH),)
|
||||
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
|
||||
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))-$(GIT_LAST_COMMIT)
|
||||
else
|
||||
VERSION ?= master
|
||||
VERSION ?= master-$(GIT_LAST_COMMIT)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Reference in New Issue
Block a user