mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
chore(common/resources): use shared scopes definition
This starts the shared scope definition. First cab off the rank is commit-msg
This commit is contained in:
parent
3575691ef9
commit
13b44a7e30
5 changed files with 80 additions and 17 deletions
Binary file not shown.
|
|
@ -15,11 +15,11 @@
|
|||
# Get the directory where this script lives, i.e. resources/git-hooks
|
||||
HOOK_DIRECTORY="$(dirname "$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")")"
|
||||
|
||||
if [ -f $(dirname "${BASH_SOURCE[0]}")/commit-msg-defs ]; then
|
||||
. $(dirname "${BASH_SOURCE[0]}")/commit-msg-defs
|
||||
else
|
||||
. $HOOK_DIRECTORY/commit-msg-defs
|
||||
fi
|
||||
. "$HOOK_DIRECTORY/../build/jq.inc.sh"
|
||||
. "$HOOK_DIRECTORY/commit-msg-defs"
|
||||
|
||||
scopes=( $("$JQ" -r '[.scopes | paths | reduce .[] as $item (""; if . == "" then $item else . + "/" + $item end)] | join(" ")' < "$HOOK_DIRECTORY/../scopes/scopes.json") )
|
||||
types=( $("$JQ" -r '.commitTypes | join(" ")' < "$HOOK_DIRECTORY/../scopes/commit-types.json") )
|
||||
|
||||
#
|
||||
# Define terminal colours.
|
||||
|
|
|
|||
|
|
@ -2,17 +2,5 @@
|
|||
# Configurable options for types, scopes and message length.
|
||||
#
|
||||
|
||||
types=(fix feat chore change docs style refactor test auto)
|
||||
scopes=( \
|
||||
android android/app android/browser android/engine android/oem \
|
||||
ci \
|
||||
common common/core common/lmlayer \
|
||||
developer developer/compiler developer/ide developer/tools \
|
||||
ios ios/app ios/browser ios/engine ios/oem \
|
||||
linux linux/config linux/engine linux/ibus linux/oem \
|
||||
mac mac/config mac/engine mac/oem \
|
||||
web web/engine web/oem web/ui \
|
||||
windows windows/config windows/engine windows/oem \
|
||||
)
|
||||
min_length=4
|
||||
max_length=128
|
||||
|
|
|
|||
13
resources/scopes/commit-types.json
Normal file
13
resources/scopes/commit-types.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"commitTypes": [
|
||||
"fix",
|
||||
"feat",
|
||||
"chore",
|
||||
"change",
|
||||
"docs",
|
||||
"style",
|
||||
"refactor",
|
||||
"test",
|
||||
"auto"
|
||||
]
|
||||
}
|
||||
62
resources/scopes/scopes.json
Normal file
62
resources/scopes/scopes.json
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"scopes": {
|
||||
"android": {
|
||||
"app": null,
|
||||
"browser": null,
|
||||
"engine": null,
|
||||
"resources": null,
|
||||
"samples": null
|
||||
},
|
||||
"ios": {
|
||||
"app": null,
|
||||
"browser": null,
|
||||
"engine": null,
|
||||
"resources": null,
|
||||
"samples": null
|
||||
},
|
||||
"linux": {
|
||||
"config": null,
|
||||
"engine": null,
|
||||
"resources": null,
|
||||
"samples": null
|
||||
},
|
||||
"web": {
|
||||
"engine": null,
|
||||
"resources": null,
|
||||
"ui": null,
|
||||
"samples": null
|
||||
},
|
||||
"mac": {
|
||||
"config": null,
|
||||
"engine": null,
|
||||
"resources": null,
|
||||
"samples": null
|
||||
},
|
||||
"developer": {
|
||||
"compilers": null,
|
||||
"ide": null,
|
||||
"resources": null,
|
||||
"tools": null
|
||||
},
|
||||
"common": {
|
||||
"core": {
|
||||
"desktop": null,
|
||||
"web": null
|
||||
},
|
||||
"model": {
|
||||
"types": null,
|
||||
"templates": null,
|
||||
"wordbreakers": null
|
||||
},
|
||||
"resources": null,
|
||||
"ci": null
|
||||
},
|
||||
"oem": {
|
||||
"fv": {
|
||||
"android": null,
|
||||
"ios": null,
|
||||
"linux": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue