Skip to content

Commit

Permalink
[#8] 1.0.0 - fixed git hook
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Aug 7, 2024
1 parent 500385a commit 81e5e49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ issue_id=$(echo $BRANCH_NAME | cut -d'-' -f1)

if [ ! -z "$issue_id" ]; then
echo "Found Issue ID: $issue_id"
issue_id="[#$issue_id] "
issue_id="[#$issue_id] $VERSION -"
else
issue_id=""
issue_id="$VERSION -"
fi

echo "$issue_idv$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE
echo "$issue_id $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE

echo "Updated commit message: $(cat $COMMIT_MSG_FILE)"

echo "prepare-commit-msg hook finished"
2 changes: 1 addition & 1 deletion test
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0 -
[#8] 1.0.0 - [#8] 1.0.0 - [#8] 1.0.0 - 1.0.0 - 1.0.0 -

0 comments on commit 81e5e49

Please sign in to comment.