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

Avoid needing to update tests for every WordPress release #4

Closed
danielbachhuber opened this issue Apr 21, 2017 · 8 comments
Closed

Comments

@danielbachhuber
Copy link
Member

Instead of #3 and wp-cli/wp-cli#3880, we should come up with some reliable abstraction that means we don't have to update tests fro every WordPress release.

@schlessera
Copy link
Member

We can directly use api.wordpress.org to fetch the latest version and store it. Then compare against this version. The API should provide both the version and the link to download.

@gitlost
Copy link
Contributor

gitlost commented May 22, 2017

I tried out a more hacky scheme that scrapes https://wordpress.org/download/release-archive/ to get the latest subversions of all versions and puts them in an array that can be accessed by special {WP_VERS[ver]} variables - see gitlost#2.

@danielbachhuber
Copy link
Member Author

@gitlost Why not use api.wordpress.org to access all versions?

@gitlost
Copy link
Contributor

gitlost commented May 22, 2017

Yes that's the best way. (I thought I'd need the previous versions too and didn't want to have to do the version decrement maths - but it turned out they're not needed. Also it was quite handy to deal with the preg arrays!)

@gitlost
Copy link
Contributor

gitlost commented May 22, 2017

What do you think of the "{WP_VERS[ver]}" scheme - is it worth pursuing?

@danielbachhuber
Copy link
Member Author

What do you think of the "{WP_VERS[ver]}" scheme - is it worth pursuing?

It's confusing and I don't quite understand it. I think it'd be better to go with something simpler.

@gitlost
Copy link
Contributor

gitlost commented May 30, 2017

The latest iteration of gitlost#2 uses api.wordpress.org, and the variable syntax has been decryptified to {WP_VERSION-version-latest} - alternative suggestions welcome.

(I also did a demo wp core latest_version command gitlost#4, which might be useful in shell scripts.)

@danielbachhuber
Copy link
Member Author

The latest iteration of gitlost#2 uses api.wordpress.org, and the variable syntax has been decryptified to {WP_VERSION-version-latest} - alternative suggestions welcome.

This looks good. Can you submit the PR against this repo, and also against wp-cli/wp-cli ?

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

No branches or pull requests

3 participants