mirror of
https://github.com/libretro/libretro-super
synced 2025-01-27 15:35:16 +00:00
libretro-buildbot-recipe.sh: Don't rely on the UPDATE variable.
This commit is contained in:
parent
f6fd214617
commit
e6e194a82d
@ -594,20 +594,32 @@ while read line; do
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
BUILD="NO"
|
BUILD="NO"
|
||||||
UPDATE="YES"
|
|
||||||
|
|
||||||
if [ ! -d "${DIR}/.git" ] || [ "${CLEANUP}" = "YES" ]; then
|
if [ ! -d "${DIR}/.git" ] || [ "${CLEANUP}" = "YES" ]; then
|
||||||
rm -rfv -- "$DIR"
|
rm -rfv -- "$DIR"
|
||||||
echo "cloning repo $URL..."
|
echo "cloning repo $URL..."
|
||||||
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
||||||
BUILD="YES"
|
BUILD="YES"
|
||||||
UPDATE="NO"
|
|
||||||
else
|
else
|
||||||
|
if [ -f "$DIR/.forcebuild" ]; then
|
||||||
|
echo "found $DIR/.forcebuild file, building $NAME"
|
||||||
|
BUILD="YES"
|
||||||
|
fi
|
||||||
|
|
||||||
HEAD="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" || \
|
HEAD="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" || \
|
||||||
{ echo 'git directory broken, removing $NAME and skipping.'; \
|
{ echo "git directory broken, removing $DIR and skipping $NAME."; \
|
||||||
rm -rfv -- "$DIR" && continue; }
|
rm -rfv -- "$DIR" && continue; }
|
||||||
echo "pulling changes from repo $URL..."
|
echo "pulling changes from repo $URL..."
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" pull
|
git --work-tree="$DIR" --git-dir="$DIR/.git" pull
|
||||||
|
|
||||||
|
if [ "$HEAD" = "$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
||||||
|
BUILD="NO"
|
||||||
|
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
|
||||||
|
BUILD="YES"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$DIR" || { echo "Failed to cd to ${DIR}, skipping ${NAME}"; continue; }
|
cd "$DIR" || { echo "Failed to cd to ${DIR}, skipping ${NAME}"; continue; }
|
||||||
@ -621,23 +633,6 @@ while read line; do
|
|||||||
git checkout "${GIT_BRANCH}"
|
git checkout "${GIT_BRANCH}"
|
||||||
git branch -D "${CURRENT_BRANCH}"
|
git branch -D "${CURRENT_BRANCH}"
|
||||||
BUILD="YES"
|
BUILD="YES"
|
||||||
UPDATE="NO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${UPDATE}" != "NO" ]; then
|
|
||||||
if [ -f .forcebuild ]; then
|
|
||||||
echo "found .forcebuild file, building $NAME"
|
|
||||||
BUILD="YES"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$HEAD" = "$(git rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
|
||||||
BUILD="NO"
|
|
||||||
else
|
|
||||||
echo "resetting repo state $URL..."
|
|
||||||
git reset --hard FETCH_HEAD
|
|
||||||
git clean -xdf
|
|
||||||
BUILD="YES"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FORCE_ORIG=$FORCE
|
FORCE_ORIG=$FORCE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user