Closed kraftner closed 2 years ago
Temporary workaround for others that hit this:
wp dist-archive . ./foo-$(wp theme get foo --field=version).zip
A candidate for good-first-issue ?
I'm working on this 👍🏼
Not seeing any updates since June (presumably WordCamp Europe), so I'm going to take a look.
Getting the version from the docblock is using token_get_all, which specifically produces PHP tokens.
Another method for getting a theme's version will be required.
Bug Report
Describe the current, buggy behavior
The command currently only parses the version from PHP files, hence not getting the version of a theme in
style.css
hence not including it in the archive filename.Describe how other contributors can replicate this bug
Run the dist-archive command on a theme
Describe what you would expect as the correct outcome
An archive that includes the theme version in the filename.
Let us know what environment you are running this on
Provide a possible solution
This probably should also parse
style.css
, the regex could stay the same I suppose.https://github.com/wp-cli/dist-archive-command/blob/d6d01445433c59b63f1a6b2bd60a14b62ff6948e/src/Dist_Archive_Command.php#L95-L102
Provide additional context/Screenshots