commit b8bfb3f85340ded0a868b2780b8fa23b8d4c975d from: Thomas Adam date: Fri Mar 10 10:35:30 2023 UTC portable: maintscript: update to portable branch Now that the former "linux" branch is being retired, change the portable sync script to reference "portable". commit - da1b528cac268fe0a423aa7ba8b4c97b41381729 commit + b8bfb3f85340ded0a868b2780b8fa23b8d4c975d blob - c50d22435a7dd183916b3bba503ae92ce229711d blob + 86dc7be007bb31070d095f1a9e15ee1ee4e1ae1c --- maintscripts/sync-upstream.sh +++ maintscripts/sync-upstream.sh @@ -4,6 +4,8 @@ # # This script is under the same licence as gameoftrees itself. +PORTABLE_BRANCH="portable" + die() { echo "$@" >&2 @@ -47,13 +49,13 @@ commitc="$(git rev-list --count main...origin/main)" exit } -# Create a branch from linux (which is where the result of the cherry-picks -# will ultimately end up, but we do this work on a topic branch so that we can -# perform CI on it, and not break the 'linux' branch. +# Create a branch from $PORTABLE_BRANCH (which is where the result of the +# cherry-picks will ultimately end up, but we do this work on a topic branch +# so that we can perform CI on it, and not break the $PORTABLE_BRANCH branch. echo "Creating sync branch..." git branch -q -D syncup >/dev/null 2>&1 -git checkout -q linux && git checkout -q -b syncup || { +git checkout -q "$PORTABLE_BRANCH" && git checkout -q -b syncup || { die "Can't checkout syncup branch" } @@ -92,10 +94,10 @@ git rev-list --reverse --first-parent main...origin/ma echo " Passed!" echo "Creating commit for portable changes..." git commit -am "portable: remove include files found portably" - echo "...Merging branch to linux" - git checkout linux && git merge --ff-only - && { + echo "...Merging branch to $PORTABLE_BRANCH" + git checkout "$PORTABLE_BRANCH" && git merge --ff-only - && { echo "Pushing to GH..." - git push gh || die "Couldn't push linux to GH" + git push gh || die "Couldn't push $PORTABLE_BRANCH to GH" git checkout main && \ git push gh || die "Couldn't push main to GH" } @@ -103,4 +105,4 @@ git rev-list --reverse --first-parent main...origin/ma } echo "Wait for Cirrus-CI..." -echo "Then push main and linux to origin" +echo "Then push main and $PORTABLE_BRANCH to origin"