Skip to content

Commit

Permalink
Preserve trailing newline in $changelog for correct sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
softins committed Dec 30, 2024
1 parent 54a7968 commit 92396ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/changelog-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ group_entries() {
local index=0
for category in "${category_order[@]}"; do
# use | as delimiter, as category may contain /
changelog=$(sed -re 's|^(- '"${category}"')|'"${index}"' \1|' <<< "${changelog}")
# also re-add stripped newline from last line, for correct sorting
changelog=$(sed -re 's|^(- '"${category}"')|'"${index}"' \1|' <<< "${changelog}")$'\n'
index=$((index + 1))
done

Expand Down

0 comments on commit 92396ab

Please sign in to comment.