Fix setup script

This commit is contained in:
Tyler Perkins 2023-12-04 18:41:30 -05:00
parent 22182e6ab5
commit 2df5fa8ea2
Signed by: tyler
GPG Key ID: 03B27509E17EFDC8
2 changed files with 4 additions and 6 deletions

View File

@ -1,3 +1,3 @@
# Generic-Template # Generic-Template
Bsaic Template Repository with workflow items present Bsaic Template Repository with workflow items present.

View File

@ -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