mirror of
https://github.com/libretro/libretro-super
synced 2025-02-25 06:40:00 +00:00
libretro-buildbot-recipe.sh: Always use the branch in the recipe file.
If the checked out branch does not match the branch name in the recipe file the script will now make a shallow fetch of the correct branch, checkout the new branch and then remove the old one. If this is done it will also build a core with the new branch.
This commit is contained in:
parent
e99abc600f
commit
c2275b79f8
@ -750,6 +750,18 @@ while read line; do
|
|||||||
|
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|
||||||
|
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
|
||||||
|
if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ]; then
|
||||||
|
echo "Changing to the branch ${GIT_BRANCH} from ${CURRENT_BRANCH}"
|
||||||
|
git remote set-branches origin "${GIT_BRANCH}"
|
||||||
|
git fetch --depth 1 origin "${GIT_BRANCH}"
|
||||||
|
git checkout "${GIT_BRANCH}"
|
||||||
|
git branch -D "${CURRENT_BRANCH}"
|
||||||
|
BUILD="YES"
|
||||||
|
UPDATE="NO"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${UPDATE}" != "NO" ]; then
|
if [ "${UPDATE}" != "NO" ]; then
|
||||||
if [ -f .forcebuild ]; then
|
if [ -f .forcebuild ]; then
|
||||||
echo "found .forcebuild file, building $NAME"
|
echo "found .forcebuild file, building $NAME"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user