CLI: Source WordPress zip from a local cache file before looking for it online#1523
Closed
adamziel wants to merge 2 commits into
Closed
CLI: Source WordPress zip from a local cache file before looking for it online#1523adamziel wants to merge 2 commits into
adamziel wants to merge 2 commits into
Conversation
Closed
680cd19 to
2e376d2
Compare
Collaborator
Author
Collaborator
Author
|
Superseded by Blueprints v2 that maintain their own http cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
I couldn't use Playground CLI on the plane because
resolveWPRelease()is always called and it requires an active network connection tofetch()-request the WordPress.org API. This PR adds an offline-first WordPress zip resolution that tries to find a WordPress zip file in the local cache without any network lookups. It will only do a network lookup if it doesn't find anything locally.Implementation details
Ships a
resolveWordPressZip()function that tries finding the right WordPress versions among the zip files cached in a local directory. It looks for files matching the patternprebuilt-wp-*.zipand return one when it's found.Remaining work
nightlyorbetaor6.4.1WordPress release, once cached, will continue to be used afterwards.Testing Instructions (or ideally a Blueprint)
🚧 TBD 🚧