Fix setup script
This commit is contained in:
parent
22182e6ab5
commit
2df5fa8ea2
@ -1,3 +1,3 @@
|
|||||||
# Generic-Template
|
# Generic-Template
|
||||||
|
|
||||||
Bsaic Template Repository with workflow items present
|
Bsaic Template Repository with workflow items present.
|
||||||
|
8
setup.sh
8
setup.sh
@ -15,15 +15,13 @@ cat << 'EOF' > "$HOOK_LOCATION"
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Git hook to check for semantic commit messages in the form mentioned here
|
# Git hook to check for semantic commit messages in the form mentioned here
|
||||||
#
|
|
||||||
# https://seesparkbox.com/foundry/semantic_commit_messages
|
|
||||||
|
|
||||||
export TYPE=$(cut -d ':' -f1 < "$1" | xargs)
|
export VERB=$(cut -d ' ' -f1 < "$1")
|
||||||
export VERB=$(cut -d ':' -f2 | cut -d ' ' -f2 < "$1")
|
|
||||||
(echo "$TYPE" | egrep '^(feat|chore|docs|fix|refactor|style|test)$' > /dev/null) || (echo "Missing type feat|chore|docs|fix|refactor|style|test"; exit 1)
|
|
||||||
(grep "$VERB" .git/hooks/verbs.txt > /dev/null) || (echo "Missing a verb"; exit 1)
|
(grep "$VERB" .git/hooks/verbs.txt > /dev/null) || (echo "Missing a verb"; exit 1)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
chmod +x $HOOK_LOCATION
|
||||||
|
|
||||||
cat << 'EOF' > "$VERB_LOCATION"
|
cat << 'EOF' > "$VERB_LOCATION"
|
||||||
Remove
|
Remove
|
||||||
Delete
|
Delete
|
||||||
|
Loading…
Reference in New Issue
Block a user