Skip to content

Commit 963ffbb

Browse files
committed
try #2 to fix versioning in Makefile
1 parent 5d5535a commit 963ffbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ endif
189189
TRAVIS_BRANCH?=$(shell git symbolic-ref --short HEAD --quiet)
190190
# Use git describe to get the latest version tag, commits since then, sha and dirty flag, this
191191
# results is something like "v1.2.0-13-ab6cedf-dirty"
192-
VERSION := $(shell (git describe --tags --match 'v*' --long --dirty || echo "no-tag") | sed -re 's/(v[0-9]*\.[0-9]*)\.[0-9]*-/\1./')
192+
VERSION := $(shell (git describe --tags --match 'v*' --long --dirty || echo "no-tag") | sed -re 's/(\.0)?-/./')
193193
# If not on master then insert the branch name
194194
ifneq ($(TRAVIS_BRANCH),master)
195-
ifneq ($(TRAVIS_BRANCH),$(patsubst -*,,$(VERSION)))
195+
ifneq ($(findstring V%,$(TRAVIS_BRANCH)),)
196196
VERSION := $(shell echo $(VERSION) | sed -e 's/-/-$(TRAVIS_BRANCH)-/')
197197
endif
198198
endif

0 commit comments

Comments
 (0)