Skip to content

Commit

Permalink
fix: using cut in commit msg
Browse files Browse the repository at this point in the history
  • Loading branch information
munja committed Aug 2, 2022
1 parent 75e5238 commit 865f2d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .git-hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ GREEN="\033[1;32m"
# Get the commit message (the parameter we're given is just the path to the
# temporary file which holds the message).
commit_message=$(cat "$1")
echo commit_message=$commit_message
ischore=cut -c 1-15 <<< "$commit_message "
echo $ischore

# abort processing if this is a changelog release commit
if [[ "$commit_message" =~ ^chore.* ]]; then
if [[ "$ischore" == "chore(release):" ]]; then
echo "${GREEN} ✔ Changelog release"
exit 0
fi
Expand Down

0 comments on commit 865f2d6

Please sign in to comment.