Repository navigation
wp-env: Start pulling mapped git source branches - #31362
noahtallen wants to merge 2 commits into
Conversation
|
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
|
Aha, this has been bugging me for a while! Thanks for working on it. I tried this branch by checking it out & then calling it from another project using wp-env (which has been stuck on 5.7.1 for a while, despite I assume it's because I did some manual updates just to get my site current - what do you think about resetting the env before pulling? |
Yeah, that's a great idea! I guess having a dirty git state probably caused that issue, so a git reset would be important to do just in case. |
4d47004 to
a13a66f
Compare
|
Flaky tests detected in a13a66f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4770175499
|
|
Hmm @noahtallen, without a |
|
I'll have to test that! Since both would be mapped separately, I'd hope it wouldn't break anything:
And then this operation would happen in the |
|
Oh @noahtallen, for some reason, I was thinking about a |
|
@noahtallen Apologies for my tardiness in responding to this ping. Is there a particular angle from which you would like me to review this change? I haven't worked on |
|
@sarayourfriend No worries; that was a while ago and I can't recall why I added you at the time! At this point, I need to circle back to this and I think some further updates are needed. So you can disregard this PR :) |
Description
The intention of git sources was always to pull the latest changes when
wp-env --updateis run. However, we were only ever fetching and then checking out branches. This does not make the changes available on the local branch. For example, with Gutenberg, it is likely that the WordPress source branch was never pulled for everyone's local environment unless they destroyed it. As a result, it could be out of date for some time.Note that this does not affect CI, because CI is always cloning directly and not working with an existing checkout.
We now run
git pullonce we verify that we are not in a detached state and that there is a current branch name.How has this been tested?
npx wp-env start --updateScreenshots
Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).