Skip to content

Commit

Permalink
ci: use filter to exclued non release branches
Browse files Browse the repository at this point in the history
  • Loading branch information
supershal committed Sep 19, 2024
1 parent fad8976 commit 15279b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion make/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ dev.update-bootstrap-credentials-aws:

.PHONY: release-please
release-please:
ifneq ($(shell [[ "$(GIT_CURRENT_BRANCH)" = "main" ]] || [[ "$(GIT_CURRENT_BRANCH)" == release/v* ]]; echo $$?),0)
# filter Returns all whitespace-separated words in text that do match any of the pattern words.
ifeq ($(filter main release/v%,$(GIT_CURRENT_BRANCH)),)
$(error "release-please should only be run on the main or release branch")
else
release-please release-pr --repo-url $(GITHUB_ORG)/$(GITHUB_REPOSITORY) --target-branch $(GIT_CURRENT_BRANCH) --token "$$(gh auth token)"
Expand Down

0 comments on commit 15279b8

Please sign in to comment.