Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying a WordPres/WordPress branch and pulling from GitHub. (…
…#1705) ## Motivation for the change, related issues As a Core contributor, it can be helpful to pull in `trunk` or the head of another branch to test changes before they are tagged, released or appear in a nightly. This is especially the case for older branches that do not have nightly builds. This allows for the pulling in of a zip from the GitHub build repository. ## Implementation details Update to `plugin-proxy.php` 1. Accepts the new parameter `branch` 2. Considers `trunk` and `master` as the head of the repo 3. Considers `x.x` and `x.x-branch` as the head of the specified branch Update to `unzipWordPress()` 1. After calculating the WordPress path, it checks for the file `wp-config-sample.php` 2. If the file does not exist, adds a desperate last attempt to determine the correct directory ## Testing Instructions (or ideally a Blueprint) 1. Run `PLAYGROUND_URL=http://localhost:9999 npx nx run playground-website:build:wasm-wordpress-net` 2. Run `php -S localhost:9999 -t dist/packages/playground/wasm-wordpress-net` 3. To test with the 6.6 branch use this [blueprint](http://localhost:9999/?#%7B%22$schema%22:%22https://playground.wordpress.net/blueprint-schema.json%22,%22landingPage%22:%22/wp-admin%22,%22login%22:true,%22preferredVersions%22:%7B%22php%22:%227.4%22,%22wp%22:%22http://localhost:9999/plugin-proxy.php?branch=6.6%22%7D%7D) pointing to localhost. 4. To test with trunk, use this [blueprint](http://localhost:9999/?#%7B%22$schema%22:%22https://playground.wordpress.net/blueprint-schema.json%22,%22landingPage%22:%22/wp-admin%22,%22login%22:true,%22preferredVersions%22:%7B%22php%22:%227.4%22,%22wp%22:%22http://localhost:9999/plugin-proxy.php?branch=trunk%22%7D%7D) pointing to localhost. --------- Co-authored-by: Adam Zieliński <[email protected]>
- Loading branch information