-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
When developing plugins and releasing new versions, I need to increment the version in three locations:
- the plugin file header
- defined as a const in the plugin file PHP body
- in a getter in my settings.php.
I'm thinking ~ wp increment-plugin-version plugin.php /list/of/paths/to/other/files.php --major where it pulls the current version from plugin.php, increments the major/minor/patch version as requested, and does a find and replace for the past version -> new version in the files listed, and prints out the changes.
I see a comment by @schlessera referencing WP_CLI\Utils\get_file_header(), but that doesn't seem to exist. I see the function seems to be I18n's FileDataExtractor.
- Is there an existing command this should be a sub-command to?
- Was
get_file_header()ever inWP_CLI\Utils, i.e. was it moved out for any reason/is there any reason it cannot be moved there? - Any other suggestions on the name or parameters?