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

Introduce --version=beta argument for updating to latest WordPress beta #17

Closed
johnbillion opened this Issue Jun 5, 2017 · 9 comments

Comments

3 participants
@johnbillion
Contributor

johnbillion commented Jun 5, 2017

Running wp core update --version=nightly now updates to 4.9 alpha, since core branched 4.8 a few days ago and trunk is now 4.9 alpha.

If the WordPress Beta Tester plugin is used and is set to Bleeding edge nightlies it sticks to 4.8-RC2-40868. It appears to do this by appending a _beta_tester=true flag on the update request (source).

It would be great if WP-CLI supported a version flag such as wp core update --version=beta which stuck to the current beta/RC in the same way that the beta tester plugins appears to.

Might be worth pinging Westi or Dion for clarification.

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Jun 6, 2017

Member

It would be great if WP-CLI supported a version flag such as wp core update --version=beta which stuck to the current beta/RC in the same way that the beta tester plugins appears to.

👍

Member

danielbachhuber commented Jun 6, 2017

It would be great if WP-CLI supported a version flag such as wp core update --version=beta which stuck to the current beta/RC in the same way that the beta tester plugins appears to.

👍

@danielbachhuber danielbachhuber changed the title from Core nightly update jumps to next major after branching to Introduce --version=beta argument for updating to latest WordPress beta Aug 18, 2017

@ocean90

This comment has been minimized.

Show comment
Hide comment
@ocean90

ocean90 Sep 27, 2017

Contributor

It appears to do this by appending a _beta_tester=true flag on the update request

It's actually the -wp-beta-tester suffix for $wp_version, see mangle_wp_version().

Snippet from the API code:

	if ( 0 === strpos( $version, $stable_branch ) ) {
		$ver = "$stable_branch-latest";
	} elseif ( 0 === strpos( $version, $dev_branch ) ) {
		$ver = "$dev_branch-latest";
	} elseif ( 'trunk' !== $dev_branch && false !== strpos( $version, '-wp-beta-tester' ) && 0 === strpos( $version, (string) ( (float) $dev_branch + 0.1 ) ) ) {
		// Handle WordPress Beta Tester requests for bleeding-edge during release transitions. Don't provide a package for trunk if current development happens on a branch.
		$ver = "$dev_branch-latest";
	} else {
		$ver = 'latest';
	}
Contributor

ocean90 commented Sep 27, 2017

It appears to do this by appending a _beta_tester=true flag on the update request

It's actually the -wp-beta-tester suffix for $wp_version, see mangle_wp_version().

Snippet from the API code:

	if ( 0 === strpos( $version, $stable_branch ) ) {
		$ver = "$stable_branch-latest";
	} elseif ( 0 === strpos( $version, $dev_branch ) ) {
		$ver = "$dev_branch-latest";
	} elseif ( 'trunk' !== $dev_branch && false !== strpos( $version, '-wp-beta-tester' ) && 0 === strpos( $version, (string) ( (float) $dev_branch + 0.1 ) ) ) {
		// Handle WordPress Beta Tester requests for bleeding-edge during release transitions. Don't provide a package for trunk if current development happens on a branch.
		$ver = "$dev_branch-latest";
	} else {
		$ver = 'latest';
	}
@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Oct 11, 2017

Member

@johnbillion How should we handle release candidates? If you use --version=beta, would you expect to get a release candidate?

Member

danielbachhuber commented Oct 11, 2017

@johnbillion How should we handle release candidates? If you use --version=beta, would you expect to get a release candidate?

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Oct 13, 2017

Member

Agh, I cannot, for the life of me, figure out the proper URL to get a beta download offer. Any tips?

https://api.wordpress.org/core/version-check/1.7/?version=4.8.3-wp-beta-tester&php=7.0.22&locale=en_US&mysql=5.5.5&local_package=&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590

This request only appears to include the nightly that we already have.

Member

danielbachhuber commented Oct 13, 2017

Agh, I cannot, for the life of me, figure out the proper URL to get a beta download offer. Any tips?

https://api.wordpress.org/core/version-check/1.7/?version=4.8.3-wp-beta-tester&php=7.0.22&locale=en_US&mysql=5.5.5&local_package=&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590

This request only appears to include the nightly that we already have.

@ocean90

This comment has been minimized.

Show comment
Hide comment
@ocean90

ocean90 Oct 15, 2017

Contributor

@danielbachhuber The API doesn't return beta/rc packages, only the nightlies.

Contributor

ocean90 commented Oct 15, 2017

@danielbachhuber The API doesn't return beta/rc packages, only the nightlies.

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Oct 16, 2017

Member

The API doesn't return beta/rc packages, only the nightlies.

@ocean90 Oh. Is there any way to pragmatically fetch beta/rc packages (other than scraping HTML)?

Member

danielbachhuber commented Oct 16, 2017

The API doesn't return beta/rc packages, only the nightlies.

@ocean90 Oh. Is there any way to pragmatically fetch beta/rc packages (other than scraping HTML)?

@johnbillion

This comment has been minimized.

Show comment
Hide comment
@johnbillion

johnbillion Oct 27, 2017

Contributor

If you use --version=beta, would you expect to get a release candidate?

Yeah I think beta in this context should include anything from beta onwards up until release.

AFAIK that's how the Beta Tester plugin works, but I haven't checked it in a while.

Contributor

johnbillion commented Oct 27, 2017

If you use --version=beta, would you expect to get a release candidate?

Yeah I think beta in this context should include anything from beta onwards up until release.

AFAIK that's how the Beta Tester plugin works, but I haven't checked it in a while.

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber
Member

danielbachhuber commented Nov 2, 2017

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Nov 27, 2017

Member

Closing as maybelater if this is ever added to the WP.org API

Member

danielbachhuber commented Nov 27, 2017

Closing as maybelater if this is ever added to the WP.org API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment