Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio: Update wp-cli #199

Merged
merged 9 commits into from
Jun 11, 2024
Merged

Studio: Update wp-cli #199

merged 9 commits into from
Jun 11, 2024

Conversation

kozer
Copy link
Contributor

@kozer kozer commented May 31, 2024

Fixes https://github.com/Automattic/dotcom-forge/issues/7326

Proposed Changes

This PR add updating wp-cli if it's outdated

Testing Instructions

  1. Start studio
  2. Download an old wp-cli version and add it in ~/.config/Studio/server-files ( from https://github.com/wp-cli/wp-cli/releases/)
  3. Rename it wp-cli.phar.
  4. Start studio again.
  5. Navigate into ~/.config/Studio/server-filesand runphp wp-cli.phar --version`
  6. Ensure that it is the latest version
  7. Run Studio again.
  8. Ensure that wp-cli doesn't get updated again.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

src/lib/wpcli-versions.ts Outdated Show resolved Hide resolved
src/lib/wpcli-versions.ts Outdated Show resolved Hide resolved
vendor/wp-now/src/get-wp-cli-path.ts Outdated Show resolved Hide resolved
@kozer kozer requested a review from a team June 3, 2024 11:55
sejas and others added 2 commits June 10, 2024 10:46
* Get stdout from wp-cli

* Add tests to check version and if it's outdated

* Move test example from line
@kozer kozer requested review from wojtekn and sejas June 10, 2024 08:01
@kozer
Copy link
Contributor Author

kozer commented Jun 10, 2024

@sejas , I merged your PR! Thanks for the changes!
If we are ok, it's ok to be merged.

src/lib/wpcli-versions.ts Show resolved Hide resolved
@kozer kozer merged commit 72b639c into trunk Jun 11, 2024
11 checks passed
@kozer kozer deleted the feat/update_wp_cli branch June 11, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants