1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 00:22:34 +02:00

fix unit test

This commit is contained in:
2024-06-04 20:17:54 +02:00
parent 7c1b564648
commit c5981cdeb3
8 changed files with 107 additions and 11 deletions

View File

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