Skip to content

Support beta/rc releases #260

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

johnbillion
Copy link
Contributor

Fixes #17.

Comment on lines +1154 to 1156
|| 'beta' === $assoc_args['version']
|| 'rc' === $assoc_args['version']
|| 'nightly' === $assoc_args['version']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use in_array here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep could do. I try to touch as few lines as possible, at least to begin with.

@swissspidy
Copy link
Member

It would be nice (although not urgent) if we could pick this up again.

I think if beta or rc is passed, we can fetch the latest offerings from https://api.wordpress.org/core/version-check/1.7/?channel=development to see if there's a matching release.

For that we need to update the WpOrgApi here to add a $channel arg:

https://github.com/wp-cli/wp-cli/blob/3ca317ad8b50ebaf9580373a383490a82b768f4a/php/WP_CLI/WpOrgApi.php#L129-L177

Then we can use that class here

@johnbillion
Copy link
Contributor Author

If someone wants to take this over be my guest. See #17 for some more recent discussion and linked meta issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce --version=beta argument for updating to latest WordPress beta
3 participants