From abf846da2a323e40d51eb77d0b78b1f6a82db466 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mar 24 2021 15:58:32 +0000 Subject: Resolve the branch name from the current repo branch We're following the branch naming convention here using c8-sig-storage-ceph- and instead of hardcoding the branch name in the script, we can resolve it from the current repo, making this Makefile portable (w/o changes) on the next branches (e.g.pacific). Signed-off-by: Francesco Pantano --- diff --git a/Makefile b/Makefile index fff4f05..793954d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SHELL := bash NAME = cephadm DIST ?= el8 BASE := "https://github.com/ceph/ceph" -BRANCH := "octopus" +BRANCH := $(shell git rev-parse --abbrev-ref HEAD | cut -d'-' -f5) VERSION ?= $(shell cat SPECS/cephadm.spec.in | awk '/Version/ { print $$2}') LOCALHASH := $(shell cat SPECS/cephadm.spec.in | awk '/Source0/ { print $$2}' | cut -d'/' -f7) RELEASE ?= $(shell cat SPECS/cephadm.spec.in | awk '/Release/ {print $$2}' | cut -d'%' -f1)