]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
SCRIPTS: announce-release: place the send command in the mail's header
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Feb 2020 07:10:06 +0000 (08:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Feb 2020 07:10:06 +0000 (08:10 +0100)
I'm fed up with having to scroll my terminals trying to look for the
mail send command printed 30 minutes before the release, let's have
it copied into the e-mail template itself, and replace the old headers
that used to be duplicated there and that are not needed anymore.

scripts/announce-release

index 3e0d1e35649cccc0b80cc3ef284274776dcf4da9..ff32d32432b526829461af5e4e20191a900d86a3 100755 (executable)
@@ -117,9 +117,12 @@ if [ -e "$HTML" ]; then
        die "$HTML already exists, please remove it."
 fi
 
-(echo "Subject: [ANNOUNCE] haproxy-$NEW"
- echo "To: haproxy@formilux.org"
- echo
+(
+ echo "# Send this using:"
+ echo "#   mutt -i <(tail -n +4 ${OUTPUT##*/}) -s \"[ANNOUNCE] haproxy-$NEW\" haproxy@formilux.org"
+) >> "$OUTPUT"
+
+(echo
  echo "Hi,"
  echo
  echo -n "HAProxy $NEW was released on $DATE. It added "
@@ -210,7 +213,7 @@ humandate=$(date "+%B, $day, %Y" -d "$DATE")
 echo "The announce was emitted into file $OUTPUT."
 echo "You can edit it and send it this way :"
 echo
-echo "   mutt -i ${OUTPUT##*/} -s \"[ANNOUNCE] haproxy-$NEW\" haproxy@formilux.org"
+echo "   mutt -i <(tail -n +4 ${OUTPUT##*/}) -s \"[ANNOUNCE] haproxy-$NEW\" haproxy@formilux.org"
 echo
 echo "The HTML block was emitted into $HTML and needs to be finished by hand."
 echo