From d1dca9de62ebc8e25eceeb6cdc7f278e94ca13c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?=
 <zmoelnig@users.sourceforge.net>
Date: Tue, 23 Sep 2008 09:38:02 +0000
Subject: add a link to the full logs in the mail-body (sent if the build has
 failed)

svn path=/trunk/; revision=10308
---
 scripts/auto-build/run-automated-builder | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'scripts/auto-build/run-automated-builder')

diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder
index 615fa7d5..b0c79d18 100755
--- a/scripts/auto-build/run-automated-builder
+++ b/scripts/auto-build/run-automated-builder
@@ -14,10 +14,18 @@ SCRIPT_DIR=`echo $0 | sed 's|\(.*\)/.*$|\1|'`
 # the name of this script
 SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`
 
+mailbody_on_failure () {
+ tail -20 ${LOGFILE}
+ echo ""
+ echo "the full logfile can be viewed at"
+ echo "http://autobuild.puredata.info/auto-build/${DATE}/logs/${LOGFILE}"
+}
+
 run_build_script ()
 {
 	 distro=$1
 
+	## LATER: make the uploaded ${LOGFILE} (name) be consistent with the uploaded package-file (name)
 	 LOGFILE=${HOME}/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}_${SCRIPT}.txt
 	 touch ${LOGFILE} 
 
@@ -38,7 +46,8 @@ run_build_script ()
 	 if [ "x${completion_test}" != "xSUCCESS" ]; then
 		if [ "x${RECIPIENT}" != "x" ]; then
 		  SUBJECT="autobuild: $distro $HOSTNAME $DATE $TIME"
-		  tail -20 ${LOGFILE} | mail -s "${SUBJECT}" ${RECIPIENT}
+		  mailbody_on_failure | mail -s "${SUBJECT}" ${RECIPIENT}
+		  #tail -20 ${LOGFILE} | mail -s "${SUBJECT}" ${RECIPIENT}
 		fi
 	 fi
 }
-- 
cgit v1.2.1