kopia lustrzana https://github.com/weetmuts/wmbusmeters
Added tracking of branch in version string.
rodzic
7b9e9a3b8d
commit
83c2e24a83
15
Makefile
15
Makefile
|
@ -51,16 +51,23 @@ $(shell mkdir -p $(BUILD))
|
|||
|
||||
COMMIT_HASH?=$(shell git log --pretty=format:'%H' -n 1)
|
||||
TAG?=$(shell git describe --tags)
|
||||
BRANCH?=$(shell git rev-parse --abbrev-ref HEAD)
|
||||
CHANGES?=$(shell git status -s | grep -v '?? ')
|
||||
TAG_COMMIT_HASH?=$(shell git show-ref --tags | grep $(TAG) | cut -f 1 -d ' ')
|
||||
|
||||
ifeq ($(BRANCH),master)
|
||||
BRANCH:=
|
||||
else
|
||||
BRANCH:=$(BRANCH)_
|
||||
endif
|
||||
|
||||
ifeq ($(COMMIT),$(TAG_COMMIT))
|
||||
# Exactly on the tagged commit. The version is the tag!
|
||||
VERSION:=$(TAG)
|
||||
DEBVERSION:=$(TAG)
|
||||
VERSION:=$(BRANCH)$(TAG)
|
||||
DEBVERSION:=$(BRANCH)$(TAG)
|
||||
else
|
||||
VERSION:=$(TAG)++
|
||||
DEBVERSION:=$(TAG)++
|
||||
VERSION:=$(BRANCH)$(TAG)++
|
||||
DEBVERSION:=$(BRANCH)$(TAG)++
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(CHANGES)),)
|
||||
|
|
Ładowanie…
Reference in New Issue