Closed jonathanbossenger closed 1 year ago
get_file_header()
would create a dependency on a working WordPress install. Instead, I'd suggest we copy its contents into the dist-archive
package.
I was referring to something like WP_CLI\Utils\get_file_header()
, not using the WP version.
Ah 👍
I am new to wp development and I would like to give a try to solve this. I have been able to setup a development environment (thanks @schlessera) and now I'm trying to reproduce the problem and hopefully make a PR.
I've created a PR: https://github.com/wp-cli/dist-archive-command/pull/37
Please, tell me if it is necessary to assert this here and in case it is not, I beg your perdon :)
@santilin No need to reference it in here, but rather do it the other way around: Add a mention "Fixes #36" in the description of your pull request (just edit your description and add it to the end). This will show a reference in here, and also automatically close this issue as resolved once your PR is merged.
🚢
Summary:
When running this command and using the plugin header example described in the WordPress Plugin handbook, the version number is not found and therefore not appended to the zip archive.
Steps to reproduce:
wp dist-archive
command to create plugin archiveBecause the Version in the header example does not have the trailing asterisk, the version number is not found in the plugin header.
As per this slack conversation around the issue - https://wordpress.slack.com/archives/C02RP4T41/p1547804432280500 @swissspidy suggested reusing/extracting the header parsing functionality used by the i18n command in core @schlessera suggested it might be time to extract that to a
get_file_header
helper method, or similar.