summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-08-21 16:49:11 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2012-08-21 16:50:04 (GMT)
commitf516810d3af5bfb22eb7e18e72ec2354b74b6c5f (patch)
treea9f322e4919e329c153dc432b83165c60717fb89
parent45dd3ae7353e580d074ac101542c70ecf45309f1 (diff)
downloadtip-bot-f516810d3af5bfb22eb7e18e72ec2354b74b6c5f.zip
tip-bot-f516810d3af5bfb22eb7e18e72ec2354b74b6c5f.tar.gz
tip-bot-f516810d3af5bfb22eb7e18e72ec2354b74b6c5f.tar.bz2
tip-bot-f516810d3af5bfb22eb7e18e72ec2354b74b6c5f.tar.xz
robot.sh: more useful failsafe messages
Include the "git shortlog" as part of the failsafe message; provide the list of commits as an attachment.
-rwxr-xr-xrobot.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/robot.sh b/robot.sh
index b2321fa..a13e8b4 100755
--- a/robot.sh
+++ b/robot.sh
@@ -65,14 +65,30 @@ max_mails=100
From: tip-bot alert <$SENDER>
To: H. Peter Anvin <hpa@zytor.com>
Subject: tip-bot failsafe: $count emails
+User-Agent: tip-bot failsafe
+MIME-Version: 1.0
+Content-type: multipart/mixed; boundary="----------73zc71qfWjUfy1i6"
+
+------------73zc71qfWjUfy1i6
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
Trying to send $count emails, reverting to $OLD_HEAD
EOF
git shortlog --no-walk --format='%h %s' `cat "$tmpdir"/revlist.$$` \
>> "$tmpdir"/failsafe.$$
- echo '' >> "$tmpdir"/failsafe.$$
+ cat >> "$tmpdir"/failsafe.$$ <<EOF
+------------73zc71qfWjUfy1i6
+Content-Type: text/plain; charset=UTF-8; name="commit.lst"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="commit.lst"
+
+EOF
cat "$tmpdir"/revlist.$$ >> "$tmpdir"/failsafe.$$
+ cat >> "$tmpdir"/failsafe.$$ <<EOF
+------------73zc71qfWjUfy1i6--
+EOF
sendmail -i -t < "$tmpdir"/failsafe.$$
rm -f "$tmpdir"/failsafe.$$
exit 1