fix logging to hastebin

This commit is contained in:
radius 2015-04-11 18:01:03 -04:00
parent 3891101031
commit 9a40bc03ee

View File

@ -209,7 +209,7 @@ build_libretro_generic_makefile() {
echo "compiling..." echo "compiling..."
if [ -z "${ARGS}" ]; then if [ -z "${ARGS}" ]; then
echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}"
${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} &> /tmp/buildbot.log
else else
if [ "${NAME}" = "mame2010" ]; then if [ "${NAME}" = "mame2010" ]; then
@ -217,7 +217,7 @@ build_libretro_generic_makefile() {
${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools
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} | tee /tmp/current.log ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} &> /tmp/buildbot.log
fi fi
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -228,10 +228,12 @@ build_libretro_generic_makefile() {
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
ERROR=`cat /tmp/current.log | tail -n 1000` ERROR=`cat /tmp/buildbot.log | tail -n 1000`
HASTE=`curl -XPOST http://hastebin.com/documents -d"$ERROR"` HASTE=`curl -XPOST http://hastebin.com/documents -d"$ERROR" | cut --fields=4 --delimiter='"'`
MESSAGE="$1 build failed [$jobid] [LOG: $HASTE]" MESSAGE="$1 build failed [$jobid] [LOG: $HASTE]"
fi fi
echo BUILDBOT JOB: $MESSAGE echo BUILDBOT JOB: $MESSAGE
buildbot_log "$MESSAGE" buildbot_log "$MESSAGE"