Skip to content

Commit

Permalink
update-branch should sync lucene_snapshot with 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticsearchmachine committed Sep 15, 2024
1 parent 7c6b493 commit 39ec638
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .buildkite/scripts/lucene-snapshot/update-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ if [[ "$BUILDKITE_BRANCH" != "lucene_snapshot"* ]]; then
exit 1
fi

echo --- Updating "$BUILDKITE_BRANCH" branch with main
if [[ "$BUILDKITE_BRANCH" == "lucene_snapshot_10" ]]; then
UPSTREAM="main"
elif [[ "$BUILDKITE_BRANCH" == "lucene_snapshot" ]]; then
UPSTREAM="8.x"
else
echo "Error: unknown branch: $BUILDKITE_BRANCH"
exit 1
fi

echo --- Updating "$BUILDKITE_BRANCH" branch with "$UPSTREAM"

git config --global user.name elasticsearchmachine
git config --global user.email '[email protected]'

git checkout "$BUILDKITE_BRANCH"
git fetch origin main
git merge --no-edit origin/main
git fetch origin "$UPSTREAM"
git merge --no-edit "origin/$UPSTREAM"
git push origin "$BUILDKITE_BRANCH"

0 comments on commit 39ec638

Please sign in to comment.