Makefile: improve version detection

Prior to this change, if there was a stray tag in the repository that
did not start with a "v", the Makefile would still try to use that tag
as a version tag when constructing the RPMs.

Only use the tags that start with "v", in this case.
pull/1177/head
Ken Dreyer 2016-12-12 14:20:47 -07:00
parent cda441595b
commit 20e7bad984
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# Try "make" (for SRPMS) or "make rpm"
NAME = ceph-ansible
VERSION := $(shell git describe --tags --abbrev=0 | sed 's/^v//')
VERSION := $(shell git describe --tags --abbrev=0 --match 'v*' | sed 's/^v//')
COMMIT := $(shell git rev-parse HEAD)
SHORTCOMMIT := $(shell echo $(COMMIT) | cut -c1-7)
RELEASE := $(shell git describe --tags --match 'v*' \