mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-22 00:35:57 +00:00
16 lines
533 B
Bash
16 lines
533 B
Bash
#!/bin/sh
|
|
# Enforce conventional commits: type(scope): description
|
|
# Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
|
|
|
|
msg=$(head -1 "$1")
|
|
|
|
if ! echo "$msg" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?: .+$'; then
|
|
echo "ERROR: Commit message must follow Conventional Commits format:"
|
|
echo " type(scope): description"
|
|
echo ""
|
|
echo " Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
|
|
echo ""
|
|
echo " Got: $msg"
|
|
exit 1
|
|
fi
|