Skip to content

Commit 63fbc49

Browse files
committed
Change sequence
1 parent 6a41e5a commit 63fbc49

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/update-subtree.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ jobs:
171171
fi
172172
fi
173173
git checkout main
174+
git submodule foreach 'git fetch'
174175
175176
# Tell git about the correct merge base to use, which is the subtree
176177
# head that we last merged from.
@@ -184,20 +185,19 @@ jobs:
184185
-c user.name=gitbot -c user.email=git@bot \
185186
merge -Xsubtree=library subtree/library; then
186187
echo "MERGE_CONFLICTS=yes" >> $GITHUB_ENV
188+
git submodule foreach 'grep $sm_path $toplevel/../submodule-heads | cut -f1 -d" " | xargs git checkout'
187189
git -c user.name=gitbot -c user.email=git@bot commit -a -m "Merge from $NEXT_COMMIT_HASH with conflicts"
188190
else
189191
echo "MERGE_CONFLICTS=no" >> $GITHUB_ENV
192+
git submodule foreach 'grep $sm_path $toplevel/../submodule-heads | cut -f1 -d" " | xargs git checkout'
193+
git -c user.name=gitbot -c user.email=git@bot \
194+
commit -m "Update submodules" library/
190195
fi
191196
git replace -d subtree/library
192197
git replace -d main~1
193198
NEW_SUBTREE_HEAD=$(git rev-parse subtree/library)
194199
echo "NEW_SUBTREE_HEAD=${NEW_SUBTREE_HEAD}" >> $GITHUB_ENV
195200
196-
git submodule foreach 'git fetch'
197-
git submodule foreach 'git fetch; grep $sm_path $toplevel/../submodule-heads | cut -f1 -d" " | xargs git checkout'
198-
git -c user.name=gitbot -c user.email=git@bot \
199-
commit -m "Update submodules" library/
200-
201201
sed -i "s/^channel = \"nightly-.*\"/channel = \"nightly-${NEXT_TOOLCHAIN_DATE}\"/" rust-toolchain.toml
202202
git -c user.name=gitbot -c user.email=git@bot \
203203
commit -m "Update toolchain to ${NEXT_TOOLCHAIN_DATE}" rust-toolchain.toml

0 commit comments

Comments
 (0)