Created
June 8, 2021 18:28
-
-
Save elrayle/45161cc23b7a6778f49aa37e9a5a80f3 to your computer and use it in GitHub Desktop.
Circle CI step to fail if branch name is master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- run: | |
name: Check for a branch named 'master' | |
command: | | |
git fetch --all --quiet --prune --prune-tags | |
if [[ -n "$(git branch --all --list master */master)" ]]; then | |
echo "A branch named 'master' was found. Please remove it." | |
echo "$(git branch --all --list master */master)" | |
fi | |
[[ -z "$(git branch --all --list master */master)" ]] |
Text for PR
Title
Adds Circle CI step that fails if branch name is master
Description
Fixes _____
This PR adds the Circle CI step that fails if the branch name is master.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Text for Issue:
NOTE: This applies if the repo uses Circle CI for integration testing.
Title
Add Circle CI step that fails if branch name is master
Description