@ucsantacruz/wordpress-version-updater
v1.1.1
Published
commit-and-tag-version (or standard-version) updater for the `Version` line in WordPress plugin and theme headers.
Maintainers
Readme
WordPress version updater
A custom updater for commit-and-tag-version and standard-version that reads and writes the version of a WordPress plugin or theme.
Install
npm install --save-dev @ucsantacruz/wordpress-version-updaterUse
commit-and-tag-version loads a string updater as a file path, not as a package name. Use one of these two configurations.
Option 1: A path in package.json
"commit-and-tag-version": {
"bumpFiles": [
{ "filename": "package.json", "type": "json" },
{ "filename": "package-lock.json", "type": "json" },
{
"filename": "my-plugin.php",
"updater": "node_modules/@ucsantacruz/wordpress-version-updater/index.js"
}
]
}Option 2: A .versionrc.cjs file
const wpHeader = require( '@ucsantacruz/wordpress-version-updater' );
module.exports = {
bumpFiles: [
{ filename: 'package.json', type: 'json' },
{ filename: 'package-lock.json', type: 'json' },
{ filename: 'my-plugin.php', updater: wpHeader },
],
};For a theme, use style.css as the filename.
License
GPL-2.0-or-later. See LICENSE.
