updated makefile to build versions with git ref

This commit is contained in:
konrad 2018-09-22 21:52:28 +02:00
parent 0404848be2
commit f8690081ec
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 3 deletions

View File

@ -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