|
|
@ -189,11 +189,13 @@ endif |
|
|
|
TRAVIS_BRANCH?=$(shell git symbolic-ref --short HEAD --quiet)
|
|
|
|
TRAVIS_BRANCH?=$(shell git symbolic-ref --short HEAD --quiet)
|
|
|
|
# Use git describe to get the latest version tag, commits since then, sha and dirty flag, this
|
|
|
|
# Use git describe to get the latest version tag, commits since then, sha and dirty flag, this
|
|
|
|
# results is something like "v1.2.0-13-ab6cedf-dirty"
|
|
|
|
# results is something like "v1.2.0-13-ab6cedf-dirty"
|
|
|
|
VERSION := $(shell (git describe --tags --match 'v*' --long --dirty || echo "no-tag") | sed -re 's/(\.0)?-/./')
|
|
|
|
VERSION := $(shell (git describe --tags --match 'v*' --long --dirty || echo "no-tag") | sed -re 's/(v[0-9]*\.[0-9]*)\.[0-9]*-/\1./')
|
|
|
|
# If not on master then insert the branch name
|
|
|
|
# If not on master then insert the branch name
|
|
|
|
ifneq ($(TRAVIS_BRANCH),master) |
|
|
|
ifneq ($(TRAVIS_BRANCH),master) |
|
|
|
|
|
|
|
ifneq ($(TRAVIS_BRANCH),$(patsubst -*,,$(VERSION))) |
|
|
|
VERSION := $(shell echo $(VERSION) | sed -e 's/-/-$(TRAVIS_BRANCH)-/')
|
|
|
|
VERSION := $(shell echo $(VERSION) | sed -e 's/-/-$(TRAVIS_BRANCH)-/')
|
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
endif |
|
|
|
VERSION :=$(VERSION)
|
|
|
|
VERSION :=$(VERSION)
|
|
|
|
$(info VERSION is $(VERSION)) |
|
|
|
$(info VERSION is $(VERSION)) |
|
|
|
|
|
|
|
|
|
|
|