From 9805832b2f774602bd460d05e6b7d633d00becef Mon Sep 17 00:00:00 2001 From: Akis Maziotis Date: Fri, 7 Jun 2024 13:44:29 +0300 Subject: [PATCH] [chore] Makefile - Allow releasing also from release.* branches (#201) Rationale: https://hub.mattermost.com/private-core/pl/yim6z9us9fdtfrjkdf8i16tczw --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f22c81d..f7548ae 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,8 @@ RC := $(shell echo $(CURRENT_VERSION) | grep -oE 'rc[0-9]+' | sed 's/rc//') # Check if current branch is protected define check_protected_branch @current_branch=$$(git rev-parse --abbrev-ref HEAD); \ - if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch"; then \ - echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) branch. You are on $$current_branch branch."; \ + if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch" && ! echo "$$current_branch" | grep -q "^release"; then \ + echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) or release branches. You are on $$current_branch branch."; \ exit 1; \ fi endef