]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Makefile: strip "v" from RPM versions
authorKen Dreyer <kdreyer@redhat.com>
Mon, 12 Dec 2016 21:17:52 +0000 (14:17 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 12 Dec 2016 21:22:08 +0000 (14:22 -0700)
Prior to this change, all RPMs would have a Version field that started
with "v", for example "ceph-ansible-v2.0.0-163.g2c98b1d.el7"

Strip the "v" out in these cases, so that the version is simply a
number.

Makefile

index a3c7ece0d0c025a9ca7e7eae95abd9c41e543933..1a811d46b4d718282fe9523bf380badb70e8d99f 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)
+VERSION := $(shell git describe --tags --abbrev=0 | sed 's/^v//')
 COMMIT := $(shell git rev-parse HEAD)
 SHORTCOMMIT := $(shell echo $(COMMIT) | cut -c1-7)
 RELEASE := $(shell git describe --tags --match 'v*' \