Skip to content

Support beta/rc releases#260

Draft
johnbillion wants to merge 1 commit intowp-cli:mainfrom
johnbillion:17-beta-rc
Draft

Support beta/rc releases#260
johnbillion wants to merge 1 commit intowp-cli:mainfrom
johnbillion:17-beta-rc

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.

@github-actions github-actions bot added command:core Related to 'core' command scope:distribution Related to distribution labels Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:core Related to 'core' command scope:distribution Related to distribution

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