[chore] Makefile - Allow releasing also from release.* branches (#201)
Rationale: https://hub.mattermost.com/private-core/pl/yim6z9us9fdtfrjkdf8i16tczw
This commit is contained in:
parent
bd0e6f287b
commit
9805832b2f
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -53,8 +53,8 @@ RC := $(shell echo $(CURRENT_VERSION) | grep -oE 'rc[0-9]+' | sed 's/rc//')
|
||||||
# Check if current branch is protected
|
# Check if current branch is protected
|
||||||
define check_protected_branch
|
define check_protected_branch
|
||||||
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
||||||
if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch"; then \
|
if ! echo "$(PROTECTED_BRANCH)" | grep -wq "$$current_branch" && ! echo "$$current_branch" | grep -q "^release"; then \
|
||||||
echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) branch. You are on $$current_branch branch."; \
|
echo "Error: Tagging is only allowed from $(PROTECTED_BRANCH) or release branches. You are on $$current_branch branch."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
|
|
Reference in a new issue