We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit 89e9446Copy full SHA for 89e9446
1 file changed
commit
@@ -0,0 +1,16 @@
1
+#!/usr/bin/bash
2
+echo 'Running commit script'
3
+CURRENT_BRANCH_CMD="git rev-parse --abbrev-ref HEAD"
4
+CURRENT_BRANCH=$(eval $CURRENT_BRANCH_CMD)
5
+
6
+COMMIT_WITH_BRANCH="git commit -m \"$CURRENT_BRANCH: $1\""
7
+DEFAULT_COMMIT="git commit -m \"$1\""
8
9
+if [ "$CURRENT_BRANCH" != "dev" ] && [ "$CURRENT_BRANCH" != "master" ] && [ "$CURRENT_BRANCH" != "qa" ] && [ "$CURRENT_BRANCH" != "uat" ]
10
+then
11
+ echo "Commiting with custom branch name"
12
+ eval $COMMIT_WITH_BRANCH
13
+else
14
+ echo "Commiting with default branch"
15
+ eval $DEFAULT_COMMIT
16
+fi
0 commit comments