display the latest rev. nummber / git id on failure

PR: 222721
This commit is contained in:
Wolfram Schneider 2017-10-01 19:26:53 +00:00
parent 02bb3f74fe
commit 3f8d9a5fba
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=51018

View file

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (c) 2001 Wolfram Schneider <wosch@FreeBSD.org>
# Copyright (c) 2001-2017 Wolfram Schneider <wosch@FreeBSD.org>
# Copyright (c) 2001 Dima Dorfman <dd@FreeBSD.org>
#
# Update the FreeBSD web site from the SVN repository.
@ -70,6 +70,8 @@ BUILDARGS=${BUILDARGS:-${DEFAULT_BUILDARGS}};
INSTARGS="${BUILDARGS} ${INSTARGS:-${DEFAULT_INSTARGS}}";
WEBMAILTO=${WEBMAILTO:-${DEFAULT_WEBMAILTO}};
#export NO_OBJ=YES
# Notes on the names of the release notes directories:
#
# - They weren't named the same way they will be on the web site
@ -158,15 +160,21 @@ fi
#
cd $BUILDDIR/head || exit 1;
# get latest revision
LATESTREVISION=$LOGDIR/LATESTREVISION
make -C en_US.ISO8859-1/articles/pam/ SRCS="$(pwd)" -V LATESTREVISION | \
perl -npe 's,--stringparam\s+,\n,g' > $LATESTREVISION
time make ${BUILDARGS} p-all >> $LOGFILE 2>&1 ||
(tail -50 $LOGFILE |
mail -s "FreeBSD web build failed on `hostname`" $WEBMAILTO;
(cat $LATESTREVISION >> $LOGFILE
tail -50 $LOGFILE | mail -s "FreeBSD web build failed on `hostname`" $WEBMAILTO;
exit 3) || exit 3;
cd $BUILDDIR/head/en_US.ISO8859-1/htdocs || exit 1;
( time make ${INSTARGS} all && time make ${INSTARGS} install ) >> $LOGFILE 2>&1 ||
(tail -50 $LOGFILE |
(cat $LATESTREVISION >> $LOGFILE
tail -50 $LOGFILE |
mail -s "FreeBSD web build failed on `hostname`" $WEBMAILTO;
exit 3) || exit 3;
@ -179,6 +187,7 @@ fi
#gzip -f $LOGFILE
#find $LOGDIR -mtime +60 -print0 | perl -n0e unlink
cat $LATESTREVISION >> ${LOGFILE}
buildstop=`date +%s`
buildd=$(($buildstop - $buildstart))
echo "Build ended `date` (${buildd}s)" >> ${LOGFILE}