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

Support for nightly #6

Closed
3 tasks done
johnbillion opened this issue Mar 15, 2019 · 12 comments
Closed
3 tasks done

Support for nightly #6

johnbillion opened this issue Mar 15, 2019 · 12 comments

Comments

@johnbillion
Copy link

Related: #1 and comments on that issue.

Summary

In addition to latest which corresponds to the latest stable version of WordPress, I'd like to be able to specify roots/wordpress as a dependency that pulls in the latest nightly/trunk/master version of WordPress.

Motivation

This is something that's supported by install-wp-tests.sh via the WP_VERSION=nightly environment variable. I use it in the Travis CI build matrix of my plugins (along with a daily build on Travis) so that I can be alerted to problems caused by changes in WordPress trunk well in advance of the stable release.

https://github.com/johnbillion/query-monitor/blob/458bc4fd172116b628d51c91aea64d0062d48d27/.travis.yml#L23-L27

It would be great if roots/wordpress=nightly was a branch which was built daily from WordPress trunk/master, or from the nightly build.

@austinpray
Copy link
Contributor

Yeah I can absolutely get this rolling. I don't even think it has to be automated

@austinpray
Copy link
Contributor

@johnbillion so created two branches:

https://github.com/roots/wordpress/tree/nightly-git and https://github.com/roots/wordpress/tree/nightly-svn

https://packagist.org/packages/roots/wordpress#dev-nightly-git
https://packagist.org/packages/roots/wordpress#dev-nightly-svn

Can you try these out (with minimum-stability: dev temporarily) with both composer --prefer-dist and --prefer-source? If they work well for you I can tag nightly-git as nightly

@johnbillion
Copy link
Author

Of course, because the roots/wordpress package doesn't need to change it'll just work. Nice.

I didn't need to specify minimum-stability: dev, and I'm not sure why. The Composer docs suggest that using a branch does require this, but who knows.

Installed with from both dist and source and all is good. Successfully got r44907 from core. Installing from source took ages but that's to be expected.

@austinpray
Copy link
Contributor

austinpray commented Mar 15, 2019

Sweet, gonna tag. Hope this helps!

https://github.com/roots/wordpress/releases/tag/nightly

@johnbillion
Copy link
Author

Interesting, that tag hasn't made its way through to Packagist. Are tags that don't look like valid version numbers allowed in Composer?

@johnbillion
Copy link
Author

@austinpray Did you see my message above? It looks like Composer only supports tags that look like version numbers. Might need to stick to a branch and then use dev-nightly.

@QWp6t
Copy link
Member

QWp6t commented Apr 6, 2019

@johnbillion I'm not entirely sure how @austin has everything setup here, but I'll see if that's something I can do. He's out of town right now.

@QWp6t QWp6t reopened this Apr 6, 2019
@austinpray
Copy link
Contributor

@johnbillion so just delete the tags and rename branch nightly-git to nightly and it’s done?

@QWp6t
Copy link
Member

QWp6t commented Apr 11, 2019

Yeah, I can confirm that this works as expected...

  "require": {
    "php": ">=7.1",
    "composer/installers": "^1.4",
    "vlucas/phpdotenv": "^3.0.0",
    "oscarotero/env": "^1.1.0",
-   "roots/wordpress": "5.1.1",
+   "roots/wordpress": "dev-nightly-git",
    "roots/wp-config": "1.0.0",
    "roots/wp-password-bcrypt": "1.0.0"
  },

web/wp/wp-includes/version.php

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '5.2-beta2-45163';

https://github.com/WordPress/WordPress/blob/master/wp-includes/version.php#L11-L16

@QWp6t QWp6t closed this as completed Apr 11, 2019
@johnbillion
Copy link
Author

@johnbillion so just delete the tags and rename branch nightly-git to nightly and it’s done?

Yeah a nightly branch that points to the same reference as nightly-git would be good because that way roots/wordpress, wp-phpunit/wp-phpunit, and other packages that use the nightly branch convention can be pulled in with dev-nightly.

@austinpray
Copy link
Contributor

There ya go! https://github.com/roots/wordpress/tree/nightly

@johnbillion
Copy link
Author

Thanks! Working nicely.

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

No branches or pull requests

3 participants