mirror of https://github.com/ceph/ceph-ansible.git
Makefile: handle "beta" Git tags
With this change, "make srpm" will generate an RPM with "beta" in the Release value. For example, "v3.2.0beta1" will create "ceph-ansible-3.2.0-0.beta1.1.el7.src.rpm"pull/2321/head
parent
7d7080df6c
commit
752bf3e39c
8
Makefile
8
Makefile
|
@ -6,6 +6,9 @@ NAME = ceph-ansible
|
|||
# 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"
|
||||
#
|
||||
|
@ -25,6 +28,11 @@ RELEASE := $(shell git describe --tags --match 'v*' \
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue