mirror of
https://github.com/msberends/AMR.git
synced 2025-07-11 05:02:06 +02:00
fix unit test
This commit is contained in:
17
.github/prehooks/pre-commit
vendored
17
.github/prehooks/pre-commit
vendored
@ -36,10 +36,10 @@
|
||||
# try to fetch the commit message from the standard location
|
||||
COMMIT_MSG_PATH=".git/COMMIT_EDITMSG"
|
||||
if [ -f "$COMMIT_MSG_PATH" ]; then
|
||||
COMMIT_MSG=$(cat "$COMMIT_MSG_PATH")
|
||||
COMMIT_MSG=$(cat "$COMMIT_MSG_PATH")
|
||||
else
|
||||
echo "Commit message file not found."
|
||||
echo 1
|
||||
echo "Commit message file not found."
|
||||
COMMIT_MSG=""
|
||||
fi
|
||||
# check the commit message, cancel commit if needed
|
||||
if [[ "$COMMIT_MSG" =~ \(no-check\)|\(no-checks\)|\(no-verify\) ]]; then
|
||||
@ -118,4 +118,15 @@ if [ -e "NEWS.md" ]; then
|
||||
else
|
||||
echo "- no NEWS.md found!"
|
||||
fi
|
||||
|
||||
# Prepend the version number to the commit message
|
||||
if [ -f "$COMMIT_MSG_PATH" ]; then
|
||||
# Prepend the version number
|
||||
echo "(v${currentversion}) ${COMMIT_MSG}" > "$COMMIT_MSG_PATH"
|
||||
echo "- prepended version number to commit message"
|
||||
else
|
||||
echo ""
|
||||
echo "Commit message file not found. Unable to prepend version number."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
Reference in New Issue
Block a user