Skip to content

Commit 0a25bd3

Browse files
committed
chore(git): update commit-msg hook & reorder scopes
1 parent 9d6327c commit 0a25bd3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.dev/githooks/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ scopes_file=".dev/scopes.txt"
55

66
scopes="("
77
cat "$scopes_file" | while read a;
8-
do scopes="$scopes$a|";
8+
do test -z "$a" || [[ "$a" == \#* ]] || scopes+="$a|";
99
done;
1010
scopes="${scopes%\|})"
1111

1212
cat "$1" | grep -Eq "(fix|feat|docs|style|refactor|test|chore|rework|release)(\($scopes\))?: [a-z]"
1313
result=$?
1414
if test $result -ne 0
15-
then echo "Please check that the commit message adheres to the guidelines at http://karma-runner.github.io/4.0/dev/git-commit-msg.html and matches the scopes defined in .dev/scopes.txt"
15+
then echo "Please check that the commit message adheres to the guidelines at http://karma-runner.github.io/latest/dev/git-commit-msg.html and the scope is one of $scopes as defined in $scopes_file"
1616
fi
1717
exit $result

.dev/scopes.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ readme
22
git
33
gradle
44
travis
5+
6+
# Subprojects
7+
testclient
58
player
9+
server
10+
611
plugin
712
gamerules
8-
server
13+
914
sdk
1015
framework
1116
protocol
12-
testclient

0 commit comments

Comments
 (0)