Skip to content

Commit

Permalink
Don't use rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Feb 20, 2025
1 parent 3e8a479 commit b54a2fb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/update-subtree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,20 @@ jobs:
cd ../verify-rust-std
git remote add rust-filtered ../rust-tmp/
git fetch rust-filtered
git checkout -b update-subtree/library rust-filtered/subtree/library
git rebase origin/subtree/library
git checkout -t -b update-subtree/library origin/subtree/library
SUBTREE_HEAD_MSG=$(git log --format=%s -n 1 origin/subtree/library)
UPSTREAM_FROM=$(git log --grep="${SUBTREE_HEAD_MSG}" -n 1 --format=%H rust-filtered/subtree/library)
UPSTREAM_HEAD=$(git log --format=%H -n 1 rust-filtered/subtree/library)
if [ "${UPSTREAM_HEAD}" = "${UPSTREAM_FROM}" ]; then
echo "Nothing to cherry-pick, ${UPSTREAM_FROM} matches ${UPSTREAM_HEAD} (${SUBTREE_HEAD_MSG})"
echo "MERGE_CONFLICTS=noop" >> $GITHUB_ENV
else
git cherry-pick ${UPSTREAM_FROM}..rust-filtered/subtree/library; then
echo "MERGE_CONFLICTS=maybe" >> $GITHUB_ENV
fi
- name: Create Pull Request
if: ${{ env.MERGE_CONFLICTS != 'noop' }}
uses: peter-evans/create-pull-request@v7
with:
title: 'Update subtree/library'
Expand All @@ -86,6 +96,7 @@ jobs:
path: verify-rust-std

- name: Merge subtree/library changes
if: ${{ env.MERGE_CONFLICTS != 'noop' }}
run: |
cd verify-rust-std
SYNC_BRANCH="sync-$TOOLCHAIN_DATE"
Expand Down

0 comments on commit b54a2fb

Please sign in to comment.