add logging of errors to pastebin

This commit is contained in:
radius 2015-04-11 17:22:12 -04:00
parent 822b17c7ea
commit b5dbb86966

View File

@ -1,3 +1,4 @@
# vim: set ts=3 sw=3 noet ft=sh : bash # vim: set ts=3 sw=3 noet ft=sh : bash
####usage: ####usage:
@ -213,21 +214,24 @@ build_libretro_generic_makefile() {
if [ "${NAME}" = "mame2010" ]; then if [ "${NAME}" = "mame2010" ]; then
echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools
${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools | tee current.log
fi fi
echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}"
${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} | tee current.log
fi fi
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
MESSAGE="$1 build successful ($jobid)" MESSAGE="$1 build successful [$jobid]"
if [ "${MAKEPORTABLE}" == "YES" ]; then if [ "${MAKEPORTABLE}" == "YES" ]; then
echo "$1 running retrolink ($jobid)" echo "$1 running retrolink ($jobid)"
$WORK/retrolink.sh ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $WORK/retrolink.sh ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}
fi fi
cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}
else else
MESSAGE="$1 build failed ($jobid)" ERROR=`cat current.log | tail -n 1000`
HASTE=`curl -XPOST http://hastebin.com/documents -d"$haste"`
MESSAGE="$1 build failed [$jobid] [LOG:$HASTE]"
fi fi
echo BUILDBOT JOB: $MESSAGE echo BUILDBOT JOB: $MESSAGE
buildbot_log "$MESSAGE" buildbot_log "$MESSAGE"