Commit 9f0f0bf3 authored by Adrien Oliva's avatar Adrien Oliva

fix(release): Avoid parasit comment

Signed-off-by: Adrien Oliva's avatarAdrien Oliva <olivaa+gitlab@yapbreak.fr>
parent afc99d03
......@@ -19,13 +19,20 @@ shift
TAGMESSAGE=$1
shift
GITDIR="$(git rev-parse --git-dir)"
PREPARE_COMMIT_MSG="${GITDIR}/hooks/prepare-commit-msg"
test -x "${PREPARE_COMMIT_MSG}" && mv "${PREPARE_COMMIT_MSG}" "${PREPARE_COMMIT_MSG}.release"
preparerelease
git shortlog -sne > AUTHORS
git add AUTHORS ChangeLog.md NEWS.md
git commit -F - <<HERE
build(release): Prepare release $TAG
HERE
git tag -s "$TAG" -F - <<HERE
$TAGMESSAGE
HERE
git tag -s "$TAG" -m "$TAGMESSAGE"
preparerelease
git shortlog -sne > AUTHORS
git add AUTHORS ChangeLog.md NEWS.md
......@@ -34,3 +41,4 @@ git tag -d "$TAG"
git tag -s "$TAG" -m "$TAGMESSAGE"
git push origin master --tags
test -x "${PREPARE_COMMIT_MSG}.release" && mv "${PREPARE_COMMIT_MSG}.release" "${PREPARE_COMMIT_MSG}"
#!/bin/bash
cat >> "$1" <<HERE
# Commit message template:
#
# <type>(<scope>): <subject>
#
# <description>
#
# <footer>
#
# With the following values:
# - <type>: build, ci, docs, feat, fix, perf, refactor, style, test
# - <footer>: reference to gitlab issue with tag "GTLAB #6"
#
#
HERE
{
printf "# Commit message template:"
printf "#"
printf "# <type>(<scope>): <subject>"
printf "#"
printf "# <description>"
printf "#"
printf "# <footer>"
printf "#"
printf "# With the following values:"
printf "# - <type>: build, ci, doc, feat, fix, perf, refactor, style, test"
printf "# - <footer>: reference to gitlab issue with tag \"GTLAB \\#6\""
printf "#"
} >> "$1"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment