From 53b69575fd0cce00ab40668f66cf3edb60e5bbea Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 4 Feb 2018 15:05:27 -0800 Subject: [PATCH 1/2] libretro-buildbot-recipe.sh: Don't fetch changes or reset the repo if $NOCLEAN is set. --- libretro-buildbot-recipe.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index a40c7270..50e2ff9d 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -575,12 +575,14 @@ while read line; do { echo "git directory broken, removing $DIR and skipping $NAME."; \ rm -rfv -- "$DIR" && continue; } - echo "fetching changes from repo $URL..." - git --work-tree="$DIR" --git-dir="$DIR/.git" fetch --depth 1 origin "${GIT_BRANCH}" + if [ -z "${NOCLEAN}" ]; then + echo "fetching changes from repo $URL..." + git --work-tree="$DIR" --git-dir="$DIR/.git" fetch --depth 1 origin "${GIT_BRANCH}" - echo "resetting repo state $URL..." - git --work-tree="." --git-dir=".git" -C "$DIR" reset --hard FETCH_HEAD - git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf -e .libretro-core-recipe + echo "resetting repo state $URL..." + git --work-tree="." --git-dir=".git" -C "$DIR" reset --hard FETCH_HEAD + git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf -e .libretro-core-recipe + fi if [ "$HEAD" = "$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then BUILD="NO" From 50f3a97d0baa6ac7b21570da0d71260f652879ad Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 4 Feb 2018 15:31:04 -0800 Subject: [PATCH 2/2] libretro-buildbot-recipe.sh: Add one more NOCLEAN. --- libretro-buildbot-recipe.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 50e2ff9d..10d2d5be 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -628,8 +628,11 @@ while read line; do LEIRADEL ) build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${PLATFORM} "${ARGS}" "${CORES}" ;; * ) : ;; esac - echo "Cleaning repo state after build $URL..." - git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf -e .libretro-core-recipe + + if [ -z "${NOCLEAN}" ]; then + echo "Cleaning repo state after build $URL..." + git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf -e .libretro-core-recipe + fi else echo "buildbot job: building $NAME up-to-date" fi