From a13940584d67e4dd630a330910e7460fb18e5442 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 10 Apr 2017 05:58:49 +0100 Subject: [PATCH 1/2] buildbot: use 'git reset --hard origin' to work around forced updates. --- libretro-buildbot-recipe.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 1ecdf53d..7fe219f1 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -800,9 +800,6 @@ while read line; do BUILD="YES" fi - echo "resetting repo state... " - git clean -xdf - git reset --hard echo "pulling changes from repo $URL... " OUT=`git pull` echo $OUT @@ -810,6 +807,9 @@ while read line; do if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then BUILD="NO" else + echo "resetting repo state... " + git clean -xdf + git reset --hard origin BUILD="YES" fi @@ -917,9 +917,6 @@ while read line; do BUILD="YES" fi - echo "resetting repo state... " - git clean -xdf - git reset --hard echo "pulling changes from repo $URL... " OUT=`git pull` echo $OUT @@ -927,6 +924,9 @@ while read line; do if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then BUILD="NO" else + echo "resetting repo state... " + git clean -xdf + git reset --hard origin BUILD="YES" fi cd $WORK @@ -948,9 +948,6 @@ while read line; do BUILD="YES" fi - echo "resetting repo state $URL... " - git clean -xdf - git reset --hard echo "pulling changes from repo $URL... " OUT=`git pull` echo $OUT @@ -958,6 +955,9 @@ while read line; do if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then BUILD="NO" else + echo "resetting repo state $URL... " + git clean -xdf + git reset --hard origin BUILD="YES" fi OUT=`git submodule update --init --recursive` @@ -1069,9 +1069,6 @@ buildbot_pull(){ BUILD="YES" fi - echo "resetting repo state $URL... " - git clean -xdf - git reset --hard echo "pulling changes from repo $URL... " OUT=`git pull` echo $OUT @@ -1081,6 +1078,9 @@ buildbot_pull(){ if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then BUILD="NO" else + echo "resetting repo state $URL... " + git clean -xdf + git reset --hard origin BUILD="YES" fi elif [ "${TYPE}" = "SUBMODULE" ]; then @@ -1088,6 +1088,9 @@ buildbot_pull(){ if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then BUILD="NO" else + echo "resetting repo state $URL... " + git clean -xdf + git reset --hard origin BUILD="YES" git submodule update --init --recursive #git submodule foreach git pull origin master From e9bef44a1562ad88723350308ae3b8f4622fe6cb Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 10 Apr 2017 11:16:18 +0100 Subject: [PATCH 2/2] fix typo --- libretro-buildbot-recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 7fe219f1..4a24bd5a 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -268,7 +268,7 @@ build_libretro_generic_makefile() { echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log if [ -z "${NOCLEAN}" ]; then if [ -z "${ARGS}" ]; then - echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM}_${a} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log + echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log else echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log