Skip to content

Bring template file from wp-cli#73

Merged
schlessera merged 3 commits intowp-cli:masterfrom
sasagar:develop-mustache
Jun 3, 2018
Merged

Bring template file from wp-cli#73
schlessera merged 3 commits intowp-cli:masterfrom
sasagar:develop-mustache

Conversation

@sasagar
Copy link
Copy Markdown
Contributor

@sasagar sasagar commented Jun 3, 2018

Related #72

I'm not sure this PR is enough for the issue, but the test has been passed.
If not, I'm happy to re-commit for that.

(This is my first PR for the code at WordCamp Osaka 2018.)

Thanks.

@schlessera schlessera added the command:core-version Related to 'core version' command label Jun 3, 2018
@schlessera
Copy link
Copy Markdown
Member

@sasagar Thanks for the pull request (and say hello to everyone at the CLI table in Osaka from me)!

The pull request is not correct yet. First of all, the template should go into a templates subfolder, to stick to current conventions.

Also, regarding pulling in the template via the make-phar tool:
This does not happen within this package, but is part of the overarching wp-cli/wp-cli package. So for this PR, you can just remove the make-phar bit again and it is good to be merged.

If you want to work on the makephar bit, you have to do this in the wp-cli/wp-cli package and produce a pull request against that one. Here's an example of how the templates for the config-command are pulled in: https://github.com/wp-cli/wp-cli/blob/master/utils/make-phar.php#L255-L264

You can just copy this and adapt it for the core-command.

@@ -0,0 +1,2 @@
<?php
include( '../version.mustache' );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed here and should be done in the wp-cli/wp-cli package instead.

@@ -0,0 +1,4 @@
WordPress version: {{wp-version}}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this file into a templates subfolder to stick with current conventions.

@@ -0,0 +1,4 @@
WordPress version: {{wp-version}}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, almost!

The folder is called templates (plural), not the singular template.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I'd like to change it!

@schlessera schlessera added this to the 1.0.10 milestone Jun 3, 2018
@schlessera schlessera merged commit d557fb4 into wp-cli:master Jun 3, 2018
@sasagar sasagar deleted the develop-mustache branch June 3, 2018 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:core-version Related to 'core version' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants