From 5860335ebe762f90a1785aefc3fd905fc4cbdf19 Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Fri, 8 Nov 2019 10:38:32 +0100 Subject: [PATCH] Fixes for Makefile - 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 (cherry picked from commit 19a43ff26134b1a59b4cd74cc27364ab754f3d03) --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7741802f3..258108dca 100644 --- 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)