Closed binarykitchen closed 7 years ago
regex?
see https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/blob/master/plugin-name/plugin-name.php#L19 for an example
probably /d+.d+.d+\ i think
It is supported, pass in custom regex: https://github.com/stevelacy/bump-regex#optionsregex
right thanks
hmmm, looks like the problem is still here. tried with this option
const bumpOptions = {
regex: /d+.d+.d+/
}
but then it complains with
events.js:182
throw er; // Unhandled 'error' event
^
Error: Invalid semver: version key "version" is not found in file
cc @stevelacy
to be exact, i want to bump the version in a php file like that
<?php if (!defined('ABSPATH')) exit;
/*
* Plugin Name: abc
* Plugin URI: ...
* Description: ...
* Version: 3.3.0 <--- here i want to bump this
* Author: ...
*/
...
That bumps just fine from the test I added: https://github.com/stevelacy/bump-regex/commit/8c568dd31fa27b0663934e1a18fc4e991313b0d3
Don't use custom regex, the one by default works
argh, my bad. works now. sorry about that!
No worries!
That would be so cool.
Something like this
Reason we need current and new version is because each WordPress plugin uses different formats/variables to store them. Hence search occurences for current version and change that. Or have a better idea?