From 28104c1bc38d57555ce727909e2a22dc27f3172a Mon Sep 17 00:00:00 2001 From: Micha Date: Sat, 3 Jan 2026 16:32:12 +0100 Subject: [PATCH] fix: improve changelog extraction in publish script - Simplified awk extraction without aggressive sed cleanup - Now correctly extracts version-specific changelog entries - Works with minimal or full changelog sections --- scripts/publish_release.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/publish_release.sh b/scripts/publish_release.sh index ab1e3e1..d3660d4 100755 --- a/scripts/publish_release.sh +++ b/scripts/publish_release.sh @@ -33,10 +33,15 @@ extract_changelog() { fi awk -v ver="## $version" ' - /^## [0-9]/ { if (found) exit; if ($0 ~ ver) found=1; next } - found && /^## / { exit } + /^## / { + if (found) exit + if ($0 ~ ver) { + found=1 + next + } + } found { print } - ' "$changelog_file" | sed '1d;$d' | sed -e 's/^[[:space:]]*$//' | sed -e :a -e '/^\s*$/d;N;ba' + ' "$changelog_file" } CHANGELOG_BODY="$(extract_changelog "$VERSION" "$CHANGELOG_FILE")"