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.
1 parent bda440d commit f0d7c83Copy full SHA for f0d7c83
autotag
@@ -28,6 +28,19 @@ checks() {
28
echo '🛑 Commit is already tagged - aborting.'
29
exit 1
30
fi
31
+
32
+ local BRANCH=$(git branch --show-current)
33
34
+ if [[ -z "$BRANCH" ]]; then
35
+ echo '🛑 You appear to be checked out on a commit or tag. Please check out a branch.'
36
+ exit 1
37
+ fi
38
39
+ if [[ ! "$BRANCH" =~ "$ALLOWED_BRANCHES" ]]; then
40
+ echo "🛑 You appear to be on a feature branch. Please check out your repo's default branch"
41
+ echo "Allowed branches are: $ALLOWED_BRANCHES"
42
43
44
}
45
46
if [[ "$#" -eq 0 ]] || [[ "$1" == '-h' ]] || [[ "$1" == '--help' ]]; then
0 commit comments