]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fixes for Makefile
authorJavier Pena <jpena@redhat.com>
Fri, 8 Nov 2019 09:38:32 +0000 (10:38 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 30 Mar 2020 20:31:04 +0000 (22:31 +0200)
- Set default mock configuration to epel-8-x86_64, to match the
  default dist value.
- Add support for alpha tags, like the recently added v5.0.0alpha1

Signed-off-by: Javier Pena <jpena@redhat.com>
(cherry picked from commit 19a43ff26134b1a59b4cd74cc27364ab754f3d03)

Makefile

index 7741802f362fbe3de4f85f196ae6e3b18eb489db..258108dca19804cb38ba1541dc11853ce492aeb9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ NAME = ceph-ansible
 #  "ceph-ansible-2.2.0-1.el8"
 
 DIST ?= "el8"
-MOCK_CONFIG ?= "epel-7-x86_64"
+MOCK_CONFIG ?= "epel-8-x86_64"
 TAG := $(shell git describe --tags --abbrev=0 --match 'v*')
 VERSION := $(shell echo $(TAG) | sed 's/^v//')
 COMMIT := $(shell git rev-parse HEAD)
@@ -31,6 +31,11 @@ RELEASE := $(shell git describe --tags --match 'v*' \
 ifeq ($(VERSION),$(RELEASE))
   RELEASE = 1
 endif
+ifneq (,$(findstring alpha,$(VERSION)))
+    ALPHA := $(shell echo $(VERSION) | sed 's/.*alpha/alpha/')
+    RELEASE := 0.$(ALPHA).$(RELEASE)
+    VERSION := $(subst $(ALPHA),,$(VERSION))
+endif
 ifneq (,$(findstring beta,$(VERSION)))
     BETA := $(shell echo $(VERSION) | sed 's/.*beta/beta/')
     RELEASE := 0.$(BETA).$(RELEASE)