better build status response from scripts
This commit is contained in:
parent
1623abde58
commit
b938ef6091
2 changed files with 24 additions and 11 deletions
|
@ -58,13 +58,28 @@ do
|
||||||
if [ ! -d assets ]; then
|
if [ ! -d assets ]; then
|
||||||
mkdir assets
|
mkdir assets
|
||||||
fi
|
fi
|
||||||
ant clean debug
|
ant clean debug &> $DIRECTORY/build.log
|
||||||
if [ "$BRANCH" = "release" ]; then
|
if [ "$BRANCH" = "release" ]; then
|
||||||
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-stable.apk"
|
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-stable.apk"
|
||||||
elif [ "$BRANCH" = "master" ]; then
|
elif [ "$BRANCH" = "master" ]; then
|
||||||
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-development.apk"
|
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-development.apk"
|
||||||
fi
|
fi
|
||||||
mv bin/OsmAnd-debug.apk "$BUILD_DIR/OsmAnd-$BRANCH-nb-$DATE.apk"
|
mv bin/OsmAnd-debug.apk "$BUILD_DIR/OsmAnd-$BRANCH-nb-$DATE.apk"
|
||||||
|
|
||||||
|
#clear success status
|
||||||
|
rm -f $DIRECTORY/$BRANCH.fixed
|
||||||
|
#put the log to std out
|
||||||
|
cat $DIRECTORY/build.log
|
||||||
|
BUILD=`grep FAILED $DIRECTORY/build.log | wc -l`
|
||||||
|
if [ ! $BUILD -eq 0 ]; then
|
||||||
|
touch $DIRECTORY/$BRANCH.failed
|
||||||
|
else
|
||||||
|
if [ -f $DIRECTORY/$BRANCH.failed ]; then
|
||||||
|
echo "Build fixed"
|
||||||
|
rm $DIRECTORY/$BRANCH.failed
|
||||||
|
touch $DIRECTORY/$BRANCH.fixed
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -32,16 +32,14 @@ touch $CLOG_FILE
|
||||||
"${DIRECTORY}/update_site.sh" >>$LOG_FILE 2>&1
|
"${DIRECTORY}/update_site.sh" >>$LOG_FILE 2>&1
|
||||||
|
|
||||||
cat $LOG_FILE >> $CLOG_FILE
|
cat $LOG_FILE >> $CLOG_FILE
|
||||||
BUILD=`grep FAILED $LOG_FILE | wc -l`
|
BUILD=`ls *.fixed *.failed 2> /dev/null | wc -l`
|
||||||
if [ ! $BUILD -eq 0 ]; then
|
if [ ! $BUILD -eq 0 ]; then
|
||||||
# if some failure, print out complete log
|
# if some status change, print out complete log
|
||||||
echo "BUILD FAILED:"
|
echo "Builds status changed"
|
||||||
|
echo "-------------"
|
||||||
|
echo `ls *.fixed *.failed`
|
||||||
|
echo "-------------"
|
||||||
|
echo "Complete log file:"
|
||||||
echo "-------------"
|
echo "-------------"
|
||||||
cat $LOG_FILE
|
cat $LOG_FILE
|
||||||
touch last_build_failed
|
|
||||||
else
|
|
||||||
if [ -f last_build_failed ]; then
|
|
||||||
echo "Build fixed"
|
|
||||||
rm last_build_failed
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue