libretro-buildbot-recipe.sh: Check if the HEAD commit is new or not.

Newer git versions now report 'Already up to date.' instead of 'Already up-to-date' so we need a more robust solution.
This commit is contained in:
orbea 2017-11-29 17:45:17 -08:00
parent 2f56bbc8c7
commit e3a38f76e1

View file

@ -812,10 +812,10 @@ while read line; do
fi
echo "pulling changes from repo $URL..."
OUT="$(git pull)"
echo "$OUT"
HEAD="$(git rev-parse HEAD)"
git pull
if [[ $OUT == *"Already up-to-date"* ]] && [ "${BUILD}" != "YES" ]; then
if [ "$HEAD" = "$(git rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
BUILD="NO"
else
echo "resetting repo state $URL..."
@ -944,12 +944,12 @@ buildbot_pull(){
fi
echo "pulling changes from repo $URL... "
OUT=`git pull`
echo $OUT
HEAD="$(git rev-parse HEAD)"
git pull
if [ "${TYPE}" = "PROJECT" ]; then
RADIR=$DIR
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
if [ "$HEAD" = "$(git rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
BUILD="NO"
else
echo "resetting repo state $URL... "