Skip to content

Commit

Permalink
changelog: fix template script to handle branches with slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ctheune committed Nov 2, 2024
1 parent c2827f3 commit 6fc6606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6fc6606

Please sign in to comment.