]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Makefile: improve version detection 1177/head
authorKen Dreyer <kdreyer@redhat.com>
Mon, 12 Dec 2016 21:20:47 +0000 (14:20 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 12 Dec 2016 21:22:29 +0000 (14:22 -0700)
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.

Makefile

index 1a811d46b4d718282fe9523bf380badb70e8d99f..120be428d5aee22de5e20a5f4eda92fa5e0cf477 100644 (file)
--- 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*' \