Skip to content

Commit 664345d

Browse files
authored
[chore] Makefile - Allow releasing also from release.* branches (#787)
Rationale: https://hub.mattermost.com/private-core/pl/yim6z9us9fdtfrjkdf8i16tczw Signed-off-by: Akis Maziotis <akis.maziotis@mattermost.com>
1 parent 516750b commit 664345d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ RC := $(shell echo $(CURRENT_VERSION) | grep -oE 'rc[0-9]+' | sed 's/rc//')
5252
# Check if current branch is protected
5353
define check_protected_branch
5454
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
55-
if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch"; then \
56-
echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) branch. You are on $$current_branch branch."; \
55+
if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch" && ! echo "$$current_branch" | grep -q "^release"; then \
56+
echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) or release branches. You are on $$current_branch branch."; \
5757
exit 1; \
5858
fi
5959
endef

0 commit comments

Comments
 (0)