aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/release.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/contrib/release.sh b/contrib/release.sh
index e3b3369c..001c68d2 100755
--- a/contrib/release.sh
+++ b/contrib/release.sh
@@ -13,7 +13,25 @@ tag_url="https://git.sr.ht/~rjarry/aerc/refs/$next_tag"
echo "======= Creating release commit..."
sed -i GNUmakefile -e "s/$prev_tag/$next_tag/g"
-sed -i CHANGELOG.md -e "s|^## \[Unreleased\].*|&\n\n## [$next_tag]($tag_url) - $(date +%Y-%m-%d)|"
+make wrap
+{
+ echo
+ echo "## [$next_tag]($tag_url) - $(date +%Y-%m-%d)"
+ for kind in Added Fixed Changed Deprecated; do
+ format="%(trailers:key=Changelog-$kind,unfold,valueonly)"
+ if git log --format="$format" $prev_tag.. | grep -q .; then
+ echo
+ echo "### $kind"
+ echo
+ git log --format="$format" $prev_tag.. | \
+ sed '/^$/d; s/[[:space:]]\+/ /; s/^/- /' | \
+ ./wrap -r
+ fi
+ done
+} > .changelog.md
+sed -i CHANGELOG.md -e '/^The format is based on/ r .changelog.md'
+${EDITOR:-vi} CHANGELOG.md
+rm -f .changelog.md
git add GNUmakefile CHANGELOG.md
git commit -sm "Release version $next_tag"