From: Ken Dreyer Date: Mon, 12 Dec 2016 21:20:47 +0000 (-0700) Subject: Makefile: improve version detection X-Git-Tag: v2.1.0~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=20e7bad9842a07655cd7c37a4944a648e527cabf;p=ceph-ansible.git 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. --- diff --git a/Makefile b/Makefile index 1a811d46b..120be428d 100644 --- a/Makefile +++ b/Makefile @@ -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*' \