release.sh: fine tuning

Shuffle the To/Cc/Bcc headers to avoid people from doing reply all to
~sircmpwn/aerc@lists.sr.ht. Also add Cc: aerc-devel so that the lists
archives all have the base message. Unfortunately, there is no way to
prevent people from doing reply all and trying to send emails to
aerc-announce. Putting aerc-announce in Bcc sounds very ugly.

Include the person doing the release as Bcc. sendmail -t does not have
a copy-to=Sent option.

Use base32 and a shorter suffix for Message-ID. base64 is ugly.

Use 'vi' if $EDITOR is unset.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
This commit is contained in:
Robin Jarry 2022-07-12 00:37:10 +02:00
parent 050d54a822
commit 6504faa88c

View file

@ -34,11 +34,13 @@ trap "rm -f -- $email" EXIT
cat >"$email" <<EOF cat >"$email" <<EOF
To: aerc-annouce <~rjarry/aerc-announce@lists.sr.ht> To: aerc-annouce <~rjarry/aerc-announce@lists.sr.ht>
Cc: aerc <~sircmpwn/aerc@lists.sr.ht> Cc: aerc-devel <~rjarry/aerc-devel@lists.sr.ht>
Bcc: aerc <~sircmpwn/aerc@lists.sr.ht>,
$(git config user.name) <$(git config user.email)>
Reply-To: aerc-devel <~rjarry/aerc-devel@lists.sr.ht> Reply-To: aerc-devel <~rjarry/aerc-devel@lists.sr.ht>
Subject: aerc $next_tag Subject: aerc $next_tag
User-Agent: aerc/$next_tag User-Agent: aerc/$next_tag
Message-ID: <$(date +%Y%m%d%H%M%S).$(base64 -w20 < /dev/urandom | head -n1)@$(hostname)> Message-ID: <$(date +%Y%m%d%H%M%S).$(base32 -w12 < /dev/urandom | head -n1)@$(hostname)>
Hi all, Hi all,
@ -49,6 +51,6 @@ https://git.sr.ht/~rjarry/aerc/refs/$next_tag
$(git tag -l --format='%(contents)' "$next_tag" | sed -n '/BEGIN PGP SIGNATURE/q;p') $(git tag -l --format='%(contents)' "$next_tag" | sed -n '/BEGIN PGP SIGNATURE/q;p')
EOF EOF
$EDITOR "$email" ${EDITOR:-vi} "$email"
/usr/sbin/sendmail -t < "$email" /usr/sbin/sendmail -t < "$email"