2010-11-14 14:13:48 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-07-06 00:30:17 +00:00
|
|
|
export TOPDIR=$(dirname $0)
|
|
|
|
|
|
|
|
. $TOPDIR/settings.sh
|
|
|
|
. $TOPDIR/common.sh
|
|
|
|
|
2017-06-06 12:10:48 +00:00
|
|
|
PUBDIRJIG=$1
|
|
|
|
OUTDIR=$2
|
|
|
|
ARCH=$3
|
|
|
|
RESULTS=$4
|
2010-11-14 14:13:48 -01:00
|
|
|
|
|
|
|
OUTFILE=$OUTDIR/$ARCH/HEADER.html
|
2017-06-22 16:25:02 +00:00
|
|
|
INLOGS="/srv/cdbuilder.debian.org/dst/deb-cd/log"
|
2012-07-06 00:30:17 +00:00
|
|
|
OUTLOGS="build-logs/$DATE"
|
2010-11-14 14:13:48 -01:00
|
|
|
|
|
|
|
grep -q WARNING $OUTFILE
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
echo >> $OUTFILE
|
|
|
|
echo "<p><strong>WARNING:</strong>" >> $OUTFILE
|
|
|
|
echo "This build is not up to date; it is the most recent successful build.</p>" >> $OUTFILE
|
|
|
|
echo >> $OUTFILE
|
|
|
|
echo "<p>Later weekly builds failed with errors:</p>" >> $OUTFILE
|
|
|
|
fi
|
|
|
|
|
2017-06-06 12:10:48 +00:00
|
|
|
mkdir -p $OUTDIR/$ARCH/log/$DATE
|
|
|
|
cp $PUBDIRJIG/$ARCH/*.log $OUTDIR/$ARCH/log/$DATE
|
|
|
|
|
2010-11-14 14:13:48 -01:00
|
|
|
echo "<hr>" >> $OUTFILE
|
|
|
|
echo "<ul>" >> $OUTFILE
|
2012-07-06 00:30:17 +00:00
|
|
|
mkdir -p ${OUTDIR}/${ARCH}/${OUTLOGS}
|
2010-11-14 14:13:48 -01:00
|
|
|
for RESULT in $RESULTS; do
|
|
|
|
TYPE=`echo $RESULT | awk -F / '{print $1}'`
|
|
|
|
ERROR=`echo $RESULT | awk -F / '{print $2}'`
|
|
|
|
DATE=`echo $RESULT | awk -F / '{print $3}'`
|
2012-07-06 00:30:17 +00:00
|
|
|
LOGFILE=`echo $RESULT | awk -F / '{print $4}'`
|
2017-06-06 12:10:48 +00:00
|
|
|
BUILDNAME=`echo $TYPE | sed 's/FAIL//g'`
|
|
|
|
DESC=`build_description ${BUILDNAME}`
|
|
|
|
echo "<li>$DESC build failed with error $ERROR at $DATE; <a href=\"log/$DATE/${BUILDNAME}.log\">logfile</a>" >> $OUTFILE
|
2012-07-06 00:30:17 +00:00
|
|
|
|
2010-11-14 14:13:48 -01:00
|
|
|
done
|
|
|
|
echo "</ul>" >> $OUTFILE
|
|
|
|
|