We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d187942 + 38b7658 commit 67d6aa4Copy full SHA for 67d6aa4
pre-check.sh
100644
100755
@@ -2,13 +2,13 @@
2
3
branch=$(git rev-parse --abbrev-ref HEAD)
4
5
-if [[ "${branch}" != "main" ]]; then
6
- echo "This script can only be run on the main branch. Current branch is ${branch}"
+if [[ "${branch}" != "main" && ! "${branch}" =~ ^release- ]]; then
+ echo "This script can only be run on the main or release-* branches. Current branch is ${branch}"
7
exit 1
8
fi
9
10
if ! git diff --quiet; then
11
- echo "This script must only run on a clean main branch."
+ echo "This script must only run on a clean branch."
12
echo
13
git status
14
0 commit comments