From 6fc6606793d63c59ac0d363247416a96f6e5e0e1 Mon Sep 17 00:00:00 2001 From: Christian Theune Date: Sat, 2 Nov 2024 18:43:05 +0100 Subject: [PATCH] changelog: fix template script to handle branches with slashes --- changelog.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.sh b/changelog.sh index 963236b22..702c34189 100755 --- a/changelog.sh +++ b/changelog.sh @@ -3,7 +3,8 @@ set -e base="./changelog.d" +branch=$(git rev-parse --abbrev-ref HEAD) -new_item="${base}/$(date '+%Y%m%d_%H%M%S')_$(git rev-parse --abbrev-ref HEAD)_scriv.md" +new_item="${base}/$(date '+%Y%m%d_%H%M%S')_${branch/\//\-}_scriv.md" cp "${base}/new_fragment.md.j2" ${new_item} $EDITOR $new_item