From 81e5e493c9eac3b1478ae7534d6633efc30b9959 Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:28:54 +0200 Subject: [PATCH] [#8] 1.0.0 - fixed git hook --- .githooks/prepare-commit-msg | 8 +++++--- test | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index 8c8e1ee..7abad70 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -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" \ No newline at end of file diff --git a/test b/test index 562095e..b4a6a5f 100644 --- a/test +++ b/test @@ -1 +1 @@ -1.0.0 - +[#8] 1.0.0 - [#8] 1.0.0 - [#8] 1.0.0 - 1.0.0 - 1.0.0 -