aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-07-12 12:40:07 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-26 23:28:43 +0200
commit45e6e89b2440575a24d912250aaeb5391f640593 (patch)
treed4db76cc0656de7e3f8555ee1230ee9bcba33f03 /contrib
parentea718fe146fa21f6899179a17e218a670b832ee8 (diff)
downloadaerc-45e6e89b2440575a24d912250aaeb5391f640593.tar.gz
Add changelog
Git history is not for everyone. Let's introduce a user-oriented change log. Ideally, this file should be updated incrementally when adding a new feature. I have added contributors guidelines in README.md. Update release.sh to automatically generate the release tag message with the unreleased changes from the changelog. Link: https://keepachangelog.com/en/1.0.0/ Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/release.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/release.sh b/contrib/release.sh
index 12a0c5fe..65f5d7b6 100755
--- a/contrib/release.sh
+++ b/contrib/release.sh
@@ -9,16 +9,20 @@ read -rp "next tag ($next_tag)? " n
if [ -n "$n" ]; then
next_tag="$n"
fi
+tag_url="https://git.sr.ht/~rjarry/aerc/refs/$next_tag"
-echo "======= Updating version in Makefile..."
+echo "======= Creating release commit..."
sed -i Makefile -e "s/$prev_tag/$next_tag/g"
-git add Makefile
+sed -i CHANGELOG.md -e "s|^## \[Unreleased\].*|&\n\n## [$next_tag]($tag_url) - $(date +%Y-%m-%d)|"
+git add Makefile CHANGELOG.md
git commit -sm "Release version $next_tag"
echo "======= Creating tag..."
-git tag --edit --sign \
+changes=$(sed -n "/^## \[$next_tag\].*/,/^## \[$prev_tag\].*/{//!p;}" \
+ CHANGELOG.md | sed '1d;$d;s/^#\+/#/' )
+git -c core.commentchar='%' tag --edit --sign \
-m "Release $next_tag highlights:" \
- -m "$(git log --format='- %s' $prev_tag..)" \
+ -m "$changes" \
-m "Thanks to all contributors!" \
-m "~\$ git shortlog -sn $prev_tag..$next_tag
$(git shortlog -sn $prev_tag..)" \
@@ -46,7 +50,7 @@ Hi all,
I am glad to announce the release of aerc $next_tag.
-https://git.sr.ht/~rjarry/aerc/refs/$next_tag
+$tag_url
$(git tag -l --format='%(contents)' "$next_tag" | sed -n '/BEGIN PGP SIGNATURE/q;p')
EOF