diff options
author | Andrew Manison <amanison@anselsystems.com> | 2011-02-20 13:06:59 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2011-12-10 18:23:01 +0000 |
commit | f6a8baf2aa3c0d1b43e961d1fc0f59348c2ff508 (patch) | |
tree | b59e411508132b3f76d9323f83ab75e7e92c63f3 /rebuild-alpine.sh | |
parent | b1aafc39617b12d4e05a0e3e8b8ab26d42eb16a3 (diff) | |
download | aports-f6a8baf2aa3c0d1b43e961d1fc0f59348c2ff508.tar.bz2 aports-f6a8baf2aa3c0d1b43e961d1fc0f59348c2ff508.tar.xz |
Added code to abbreviate build log to <= 200 lines; disabled email for now
Diffstat (limited to 'rebuild-alpine.sh')
-rwxr-xr-x | rebuild-alpine.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/rebuild-alpine.sh b/rebuild-alpine.sh index 24ce9d47b5..d400b1da34 100755 --- a/rebuild-alpine.sh +++ b/rebuild-alpine.sh @@ -39,14 +39,31 @@ build () { if [ -n "$mail" ] ; then maintainer=$(grep Maintainer APKBUILD | cut -d " " -f 3-) if [ -n "$maintainer" ] ; then - recipients="$maintainer -cc dev@lists.alpinelinux.org" + recipients="'$maintainer' -cc dev@lists.alpinelinux.org" else recipients="dev@lists.alpinelinux.org" fi if [ -n "$mail" ] ; then - echo "Package $1/$p failed to build. Build output is attached" | \ - email -s "NOT SPAM $p build report" -a $rootdir/$1_$p.txt \ - -n AlpineBuildBot -f buildbot@alpinelinux.org $recipients + echo "sending mail to [$recipients]" + if [ $(wc -l $rootdir/$1_$p.txt | cut -f 1 -d ' ') -gt 200 ]; then + TMPFILE='mktemp' || exit 1 + head -n 100 $rootdir/$1_$p.txt >> $TMPFILE + echo "-------" >> $TMPFILE + echo "snip..." >> $TMPFILE + echo "-------" >> $TMPFILE + tail -n 100 $rootdir/$1_$p.txt >> $TMPFILE + BUILDLOG="$TMPFILE" + else + BUILDLOG="$rootdir/$1_$p.txt" + fi + +# echo "Package $1/$p failed to build. Build output is attached" | \ +# email -s "NOT SPAM $p build report" -a $BUILDLOG \ +# -n AlpineBuildBot -f buildbot@alpinelinux.org $recipients + if [ "$BUILDLOG" = "$TMPFILE" ]; then +# rm $BUILDLOG + mv $BUILDLOG $rootdir/$1_$p-short.txt + fi fi fi failed=$(expr "$failed" + 1) |