Skip to content

Suggested improvement to command retrieving version number #36

@jonathanbossenger

Description

@jonathanbossenger

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:

  1. Create plugin using plugin header format described in the WordPress Plugin handbook - https://developer.wordpress.org/plugins/the-basics/header-requirements/
  2. Run wp dist-archive command to create plugin archive

Because 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions