-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool to increment the version number of a plugin #169
Comments
Here's the gist, outside of WP CLI:
|
@BrianHenryIE First of all, I'm not sure it makes sense to have this be a WP-CLI command, as there's no benefit to be had from executing WordPress or using WordPress-specific contextual knowledge to make this work. It is basically just a smart That being said, I still want to answer your questions above:
|
Tagging #193 as related. And while I'm here, to note wppm.io as a SaaS that addresses this problem. I agree WordPress does not need to be loaded, and that it is just a fancy I'm imagining a step in a GitHub Actions release workflow ~ if version != tag, wp plugin increment-version $tag. |
I'm definitely guilty of reinventing such a fancy
In other projects there are also some more complex scripts where the version number is just a placeholder (even in So far these projects have all had their differences, so I am not sure if there is a one-size-fits-all solution for this kind of task. And if so, it might not necessarily be WP-CLI. |
I also needed similar tool so that I dont miss updating plugin version. So I created node package for the purpose. https://github.com/ernilambar/easy-replace-in-files |
When developing plugins and releasing new versions, I need to increment the version in three locations:
I'm thinking ~
wp increment-plugin-version plugin.php /list/of/paths/to/other/files.php --major
where it pulls the current version fromplugin.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.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?The text was updated successfully, but these errors were encountered: