Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 38 additions & 23 deletions tools/changelog-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export GH_REPO=jamulussoftware/jamulus

PR_LIST_LIMIT=300
TRANSLATION_ENTRY_TEXT="GUI: Translations have been updated:"
TRANSLATION_ENTRY_TEXT2="Translations updated from Hosted Weblate"
BUNDLED_QT_UPDATE_TEXT="Build: Updated bundled Qt6"
Copy link
Copy Markdown
Collaborator

@pljones pljones Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bunch of these defined in the bump dependencies workflow - it's probably worth covering all of them (separate groups). (It's Build: Updated + the changelog_name value.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done

# must escape ( and ) so that sed doesn't treat them as magic
BUNDLED_JACK_UPDATE_TEXT="Build: Updated bundled JACK \\(Windows-only\\)"
NSIS_UPDATE_TEXT="Build: Updated Windows Installer base \\(NSIS\\)"
ASIO_UPDATE_TEXT="Build: Updated ASIO SDK \\(Windows-only\\)"
declare -A LANGS
LANGS[de_DE]="German"
LANGS[fr_FR]="French"
Expand Down Expand Up @@ -111,33 +117,42 @@ group_entries() {

# Prepend a number to known categories in order to make their sorting position consistent:
category_order=(
"Translation:"
"$TRANSLATION_ENTRY_TEXT2"
"$TRANSLATION_ENTRY_TEXT"
"GUI"
"Accessibility"
"Client"
"Server"
"Recorder"
"Performance"
"CLI"
"Bug Fix"
"Windows"
"Installer"
"Linux"
"Mac"
"Android"
"iOS"
"Translation"
"Doc"
"Website"
"Github"
"Build"
"Autobuild"
"Code"
"Internal"
"GUI:"
"Accessibility:"
"Client:"
"Client/Server:"
"Server:"
"Recorder:"
"Performance:"
"CLI:"
"Bug Fix:"
"Windows:"
"Installer:"
"Linux:"
"Mac:"
"Android:"
"iOS:"
"Dependencies:"
"Doc:"
"Website:"
"Github:"
"$BUNDLED_QT_UPDATE_TEXT"
"$BUNDLED_JACK_UPDATE_TEXT"
"$NSIS_UPDATE_TEXT"
"$ASIO_UPDATE_TEXT"
"Build:"
"Autobuild:"
"Code:"
"Internal:"
)
local index=0
for category in "${category_order[@]}"; do
changelog=$(sed -re 's/^(- '"${category}"')/'"${index}"' \1/' <<< "${changelog}")
# use | as delimiter, as category may contain /
# 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
Loading