Shorten changelog entries, per-beta changelog sections
This commit is contained in:
1 parent
f9b4ebd167
commit
f3c3f5237f
3 files changed
+66
-27
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints the release notes for VERSION from CHANGELOG.md. A beta without its own
|
||||
# section falls back to [Unreleased], under a line saying what a beta is.
|
||||
# [#N] issue refs become plain #N so the forge links them.
|
||||
#
|
||||
# scripts/release_notes.sh 2.22.4 > release-notes.md
|
||||
set -euo pipefail
|
||||
@@ -12,13 +13,13 @@ section() {
|
||||
awk -v ver="$1" '
|
||||
$0 ~ "^## \\[" ver "\\]" { flag = 1; next }
|
||||
/^## \[/ { flag = 0 }
|
||||
flag' CHANGELOG.md | sed -e '/./,$!d'
|
||||
flag' CHANGELOG.md | sed -E -e '/./,$!d' -e 's/\[#([0-9]+)\]/#\1/g'
|
||||
}
|
||||
|
||||
NOTES=$(section "$VERSION")
|
||||
if [[ "$VERSION" == *-beta.* ]]; then
|
||||
[ -n "$NOTES" ] || NOTES=$(section Unreleased)
|
||||
printf '%s\n\n' "**Beta of ${VERSION%%-*}, for testing.** It updates in place to later betas and to the stable release. Obtainium only offers betas with *Include prereleases* switched on; F-Droid and Play never get them."
|
||||
printf '%s\n\n' "**Beta of ${VERSION%%-*}, for testing.** Updates in place; not on F-Droid or Play (Obtainium: enable *Include prereleases*)."
|
||||
fi
|
||||
if [ -n "$NOTES" ]; then
|
||||
printf '%s\n' "$NOTES"
|
||||
|
||||
Reference in new issue
Block a user