diff options
author | Robin Jarry <robin@jarry.cc> | 2024-02-01 09:07:58 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-02-26 11:03:54 +0100 |
commit | 8543aec8f12c59f914807a40f004a0360c2cb610 (patch) | |
tree | b1da33f3fbad47dfd379c114d705e73f343ad74e | |
parent | f3a61a341c81d70b51d91a71e1b0909acdcdb8f4 (diff) | |
download | aerc-8543aec8f12c59f914807a40f004a0360c2cb610.tar.gz |
release: improve generated email
* Do not hard wrap changelog entries.
* Add changes to go.mod to help downstream packagers
* Improve dry run to show the generated email instead of just printing
the changelog.
Example output for 0.17.0:
From: Robin Jarry <robin@jarry.cc>
To: aerc-annouce <~rjarry/aerc-announce@lists.sr.ht>
Cc: aerc-devel <~rjarry/aerc-devel@lists.sr.ht>
Bcc: aerc <~sircmpwn/aerc@lists.sr.ht>,
Robin Jarry <robin@jarry.cc>
Reply-To: aerc-devel <~rjarry/aerc-devel@lists.sr.ht>
Subject: aerc 0.17.0
User-Agent: aerc/0.17.0
Message-ID: <20240201091423.4YZK4ZQ3XVKJ@ringo>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
MIME-Version: 1.0
Hi all,
I am glad to announce the release of aerc 0.17.0.
https://git.sr.ht/~rjarry/aerc/refs/0.17.0
Release highlights:
# Added
- New `flagged` criteria for `:sort`.
- New `:send-keys` command to control embedded terminals.
- Account aliases now support fnmatch-style wildcards.
- New `:suspend` command bound to `<C-z>` by default.
- Disable parent context bindings by declaring them empty.
- Toggle folding with `:fold -t`.
- `mail-deleted` hook that triggers when a message is removed/moved from a folder.
- `mail-added` hook that triggers when a message is added to a folder.
- Customize key to trigger completion with `$complete` in `binds.conf`.
- Setting `complete-min-chars=manual` in `aerc.conf` now disables automatic completion, leaving only manually triggered completion.
- `.ThreadUnread` is now available in templates.
- Allow binding commands to `Alt+<number>` keys.
- `AERC_ACCOUNT` and `AERC_ADDRESS_BOOK_CMD` are now defined in the editor's environment when composing a message.
- Reply with a different account than the current one with `:reply -A <account>`.
- New `[ui].tab-title-viewer` setting to configure the message viewer tab title.
- The `{{.Subject}}` template is evaluated to the new option `[ui].empty-subject` if the subject is empty.
- Change to a folder of another account with `:cf -a <account> <folder>`.
- Patch management with `:patch`.
- Add filepath to messages in templates as .Filename(s)
- New `:menu` command to invoke other aerc commands based on a shell command output.
- CLI flags to override paths to config files.
- Automatically attach signing key with `pgp-attach-key` in `accounts.conf`.
- Copy messages across accounts with `:cp -a <account> <folder>`.
- Move messages across accounts with `:mv -a <account> <folder>`.
- Support the `draft` flag.
- Thread arrow prefixes are now fully configurable.
# Fixed
- `colorize` support for wildcards `?` and `*`.
- Selection of headers in composer after `:compose -e` followed by `:edit -E`.
- Don't lose child messages of non-queried parents in notmuch threads
- Notmuch folders defined by the query `*` handle search, filter, and unread counts correctly.
# Changed
- `:open` commands are now executed with `sh -c`.
- `:pipe` commands are now executed with `sh -c`.
- Improved command completion.
- Message viewer tab titles will now show `(no subject)` if there is no subject in the viewed email.
- Signature placement is now controlled via the `{{.Signature}}` template variable and not hardcoded.
# Changed dependencies for downstream packagers
diff --git a/go.mod b/go.mod
index 9b712a340a41..a94a7afa11e0 100644
--- a/go.mod
+++ b/go.mod
@@ -5,0 +6 @@ require (
+ git.sr.ht/~rjarry/go-opt v1.3.0
@@ -7,2 +8 @@ require (
- git.sr.ht/~rockorager/tcell-term v0.8.0
- git.sr.ht/~sircmpwn/getopt v1.0.0
+ git.sr.ht/~rockorager/tcell-term v0.10.0
@@ -14 +14 @@ require (
- github.com/emersion/go-maildir v0.3.0
+ github.com/emersion/go-maildir v0.4.1
@@ -26 +25,0 @@ require (
- github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
@@ -33 +32 @@ require (
- github.com/stretchr/testify v1.8.2
+ github.com/stretchr/testify v1.8.4
@@ -54,0 +54 @@ require (
+ golang.org/x/mod v0.8.0 // indirect
Thanks to all contributors!
~$ contrib/git-stats.sh 0.16.0..0.17.0
Author Commits Changed Files Insertions Deletions
Robin Jarry 61 650 +4908 -5576
Koni Marti 45 120 +4250 -729
Bence Ferdinandy 15 44 +452 -139
Jason Cox 14 59 +490 -232
Moritz Poldrack 11 19 +170 -568
Vitaly Ovchinnikov 11 27 +379 -38
Inwit 9 32 +497 -103
Johannes Thyssen Tishman 5 8 +292 -63
Sebastien Binet 3 5 +36 -25
Michal Siedlaczek 2 5 +66 -43
Erik Terpstra 1 2 +30 +0
George Honeywood 1 2 +3 -3
Jens Grassel 1 1 +8 +0
Karel Balej 1 1 +1 -1
Max Schillinger 1 1 +0 -1
Nojus Gudinavičius 1 5 +64 +0
Thomas Böhler 1 1 +0 -2
delitako 1 5 +30 -18
Reviewer/Tester Commits
Robin Jarry 121
Inwit 31
Moritz Poldrack 28
Koni Marti 22
Bence Ferdinandy 13
Johannes Thyssen Tishman 8
Jason Cox 4
Karel Balej 3
Thomas Böhler 3
Tim Culverhouse 3
Vitaly Ovchinnikov 2
Callum Andrew 1
Ciarán Ainsworth 1
Maarten van Gompel 1
Tristan Partin 1
Signed-off-by: Robin Jarry <robin@jarry.cc>
-rwxr-xr-x | contrib/release.sh | 97 |
1 files changed, 63 insertions, 34 deletions
diff --git a/contrib/release.sh b/contrib/release.sh index c5a83d3b..fd91be46 100755 --- a/contrib/release.sh +++ b/contrib/release.sh @@ -2,18 +2,34 @@ set -e +dry_run=false +case "$1" in +-n|--dry-run) + dry_run=true + ;; +esac + changelog() { - echo - echo "## [$next_tag]($tag_url) - $(date +%Y-%m-%d)" + title_prefix=$1 + width=$2 + first=true + wrap=cat + if [ -n "$width" ]; then + wrap="./wrap -r -w$width" + fi 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" + if [ "$first" = true ]; then + first=false + else + echo + fi + echo "$title_prefix $kind" echo git log --reverse --format="$format" $prev_tag.. | \ sed '/^$/d; s/[[:space:]]\+/ /; s/^/- /' | \ - ./wrap -r + $wrap fi done } @@ -26,36 +42,35 @@ if [ -n "$n" ]; then next_tag="$n" fi tag_url="https://git.sr.ht/~rjarry/aerc/refs/$next_tag" -case "$1" in --n|--dry-run) - changelog - exit - ;; -esac -echo "======= Creating release commit..." -sed -i GNUmakefile -e "s/$prev_tag/$next_tag/g" -make wrap -changelog > .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" - -echo "======= Creating tag..." -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 "$changes" \ - -m "Thanks to all contributors!" \ - -m "~\$ contrib/git-stats.sh $prev_tag..$next_tag +if [ "$dry_run" = false ]; then + echo "======= Creating release commit..." + sed -i GNUmakefile -e "s/$prev_tag/$next_tag/g" + make wrap + { + echo + echo "## [$next_tag]($tag_url) - $(date +%Y-%m-%d)" + echo + changelog "###" 80 + } > .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 -vesm "Release version $next_tag" + + echo "======= Creating tag..." + git -c core.commentchar='%' tag --edit --sign \ + -m "Release $next_tag highlights:" \ + -m "$(changelog '#' 72)" \ + -m "Thanks to all contributors!" \ + -m "~\$ contrib/git-stats.sh $prev_tag..$next_tag $(contrib/git-stats.sh $prev_tag..)" \ - "$next_tag" + "$next_tag" -echo "======= Pushing to remote..." -git push origin master "$next_tag" + echo "======= Pushing to remote..." + git push origin master "$next_tag" +fi echo "======= Sending release email..." @@ -82,9 +97,23 @@ I am glad to announce the release of aerc $next_tag. $tag_url -$(git tag -l --format='%(contents)' "$next_tag" | sed -n '/BEGIN PGP SIGNATURE/q;p') +Release highlights: + +$(changelog '#') + +# Changed dependencies for downstream packagers + +$(git diff -U0 $prev_tag.. go.mod) + +Thanks to all contributors! + +~\$ contrib/git-stats.sh $prev_tag..$next_tag + +$(contrib/git-stats.sh $prev_tag..) EOF ${EDITOR:-vi} "$email" -/usr/sbin/sendmail -t < "$email" +if [ "$dry_run" = false ]; then + /usr/sbin/sendmail -t < "$email" +fi |