Merge pull request #681 from orbea/recipe

libretro-buildbot-recipe.sh: Rebuild cores when using a new recipe.
This commit is contained in:
Andrés 2018-01-04 22:18:13 -05:00 committed by GitHub
commit 82574a9b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -627,11 +627,21 @@ while read line; do
else
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" clean -xdf
git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf -e .libretro-core-recipe
BUILD="YES"
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)"
if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then
@ -667,7 +677,7 @@ while read line; do
* ) : ;;
esac
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
echo "buildbot job: building $NAME up-to-date"
fi