Skip to content

Commit

Permalink
try #2 to fix versioning in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tve committed Dec 13, 2016
1 parent 5d5535a commit 963ffbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ endif
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
# 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/(v[0-9]*\.[0-9]*)\.[0-9]*-/\1./')
VERSION := $(shell (git describe --tags --match 'v*' --long --dirty || echo "no-tag") | sed -re 's/(\.0)?-/./')
# If not on master then insert the branch name
ifneq ($(TRAVIS_BRANCH),master)
ifneq ($(TRAVIS_BRANCH),$(patsubst -*,,$(VERSION)))
ifneq ($(findstring V%,$(TRAVIS_BRANCH)),)
VERSION := $(shell echo $(VERSION) | sed -e 's/-/-$(TRAVIS_BRANCH)-/')
endif
endif
Expand Down

0 comments on commit 963ffbb

Please sign in to comment.