libretro-buildbot-recipe.sh: Rebuild cores when using a new recipe.

This commit is contained in:
orbea 2018-01-04 18:56:35 -08:00
parent 74cc5a969e
commit 4c18b370af

View File

@ -627,11 +627,21 @@ while read line; do
else else
echo "resetting repo state $URL..." echo "resetting repo state $URL..."
git --work-tree="$DIR" --git-dir="$DIR/.git" reset --hard FETCH_HEAD git --work-tree="$DIR" --git-dir="$DIR/.git" reset --hard FETCH_HEAD
git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf -e .libretro-core-recipe
BUILD="YES" BUILD="YES"
fi fi
fi fi
if [ -f "$DIR/.libretro-core-recipe" ]; then
recipe="$(cat "$DIR/.libretro-core-recipe")"
if [ "$line" != "$recipe" ]; then
echo "$line" > "$DIR/.libretro-core-recipe"
BUILD="YES"
fi
else
echo "$line" > "$DIR/.libretro-core-recipe"
fi
CURRENT_BRANCH="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse --abbrev-ref HEAD)" CURRENT_BRANCH="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse --abbrev-ref HEAD)"
if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then
@ -667,7 +677,7 @@ while read line; do
* ) : ;; * ) : ;;
esac esac
echo "Cleaning repo state after build $URL..." echo "Cleaning repo state after build $URL..."
git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf -e .libretro-core-recipe
else else
echo "buildbot job: building $NAME up-to-date" echo "buildbot job: building $NAME up-to-date"
fi fi