# Set the RPM package NVR from "git describe".
# Examples:
#
+# A "git describe" value of "v2.2.0beta1" would create an NVR
+# "ceph-ansible-2.2.0-0.beta1.1.el7"
+#
# A "git describe" value of "v2.2.0rc1" would create an NVR
# "ceph-ansible-2.2.0-0.rc1.1.el7"
#
ifeq ($(VERSION),$(RELEASE))
RELEASE = 1
endif
+ifneq (,$(findstring beta,$(VERSION)))
+ BETA := $(shell echo $(VERSION) | sed 's/.*beta/beta/')
+ RELEASE := 0.$(BETA).$(RELEASE)
+ VERSION := $(subst $(BETA),,$(VERSION))
+endif
ifneq (,$(findstring rc,$(VERSION)))
RC := $(shell echo $(VERSION) | sed 's/.*rc/rc/')
RELEASE := 0.$(RC).$(RELEASE)