commit - da1b528cac268fe0a423aa7ba8b4c97b41381729
commit + b8bfb3f85340ded0a868b2780b8fa23b8d4c975d
blob - c50d22435a7dd183916b3bba503ae92ce229711d
blob + 86dc7be007bb31070d095f1a9e15ee1ee4e1ae1c
--- maintscripts/sync-upstream.sh
+++ maintscripts/sync-upstream.sh
#
# This script is under the same licence as gameoftrees itself.
+PORTABLE_BRANCH="portable"
+
die()
{
echo "$@" >&2
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"
}
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"
}
}
echo "Wait for Cirrus-CI..."
-echo "Then push main and linux to origin"
+echo "Then push main and $PORTABLE_BRANCH to origin"