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
|
||||
mkdir assets
|
||||
fi
|
||||
ant clean debug
|
||||
ant clean debug &> $DIRECTORY/build.log
|
||||
if [ "$BRANCH" = "release" ]; then
|
||||
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-stable.apk"
|
||||
elif [ "$BRANCH" = "master" ]; then
|
||||
cp bin/OsmAnd-debug.apk "$LATESTS_DIR/OsmAnd-development.apk"
|
||||
fi
|
||||
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
|
||||
done
|
||||
|
|
|
@ -32,16 +32,14 @@ touch $CLOG_FILE
|
|||
"${DIRECTORY}/update_site.sh" >>$LOG_FILE 2>&1
|
||||
|
||||
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 some failure, print out complete log
|
||||
echo "BUILD FAILED:"
|
||||
# if some status change, print out complete log
|
||||
echo "Builds status changed"
|
||||
echo "-------------"
|
||||
echo `ls *.fixed *.failed`
|
||||
echo "-------------"
|
||||
echo "Complete log file:"
|
||||
echo "-------------"
|
||||
cat $LOG_FILE
|
||||
touch last_build_failed
|
||||
else
|
||||
if [ -f last_build_failed ]; then
|
||||
echo "Build fixed"
|
||||
rm last_build_failed
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue