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 --wp=nightly
and --wp=trunk
when starting wp-now
#161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
I wonder if using only one value like trunk
would be enough.
I confirm a new folder trunk
was downloaded after running:
nvm use && npm install && npx nx build wp-now
node dist/packages/wp-now/cli.js start --wp=nightly
@danielbachhuber , currently the versions are not auto-updated, the second time you will run wp-now start --wp=trunk
, the folder will exist and the "outdated" version will be executed. Is that expected?
For common versions that is the normal behaviour, but I guess for trunk
a user would expect downloading a new version each time it has changed.
Note that |
As it turns out, I had an outdated version of the SQLite integration: I guess we need something else for that.
@swissspidy WP-CLI treats them as the same:
@sejas I think it's the expected behavior, but I don't have a strong opinion about it. Notably, I don't want it automatically deleting files if I don't have a network connection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sejas I think it's the expected behavior, but I don't have a strong opinion about it.
Notably, I don't want it automatically deleting files if I don't have a network connection.
We can always improve it further in next PRs.
Maybe a --force download flag, or ideally checking the checksum/sha of the zip before downloading it.
@danielbachhuber Perhaps we could reconsider? |
@swissspidy Personally, I think it should follow the behavior of WP-CLI. What's your argument for having different behavior? |
Fixes #158
What?
Adds support for
--wp=nightly
and--wp=trunk
when starting wp-now.How?
Returns
'https://wordpress.org/nightly-builds/wordpress-latest.zip'
fromgetWordPressVersionUrl()
whenversion === 'trunk' || version === 'nightly'
.Testing Instructions
nx preview wp-now start --path=/Users/danielbachhuber/Desktop --wp=trunk
and verify the latest nightly build is used to launch wp-now.