From aedc9127d93851929bca6ed1ba677f168c4f27c6 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 25 Jun 2024 17:55:36 -0700 Subject: [PATCH] Merge RuneLite dev branches iteratively In some cases, the merge tool cannot resolve conflicts from multiple branches at once, leading to the script failing repeatedly regardless of saved merge conflict resolution, etc. Instead, merging the branches one by one ensures conflicts can be resolved properly and reduces the complexity of conflict resolution when multiple conflicts may exist. --- src/.bin/open-runelite.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/.bin/open-runelite.sh b/src/.bin/open-runelite.sh index 70a5213..631d0c5 100755 --- a/src/.bin/open-runelite.sh +++ b/src/.bin/open-runelite.sh @@ -52,7 +52,9 @@ function build_client { # Update local dev branch and build git checkout dev || git checkout -b dev git reset --hard "$UPSTREAM_REMOTE/$UPSTREAM_BRANCH" - git merge --no-gpg-sign --no-edit "${BRANCHES_TO_MERGE[@]}" || exit 1 + for branch in "${BRANCHES_TO_MERGE[@]}"; do + git merge --no-gpg-sign --no-edit --rerere-autoupdate "$branch" || ( [[ -z "$(git rerere diff)" ]] && git commit --no-gpg-sign --no-edit) || exit 1 + done mvn clean package -DskipTests -U || exit 1 git checkout - # copy shaded jar to script's directory, removing any old shaded jars