1.0.0 • Published 7 years ago
@ecabuk/wp-version-bumper v1.0.0
@ecabuk/wp-version-bumper
Install
yarn add -D @ecabuk/wp-version-bumperSetup
On your gulpfile.js file.
const path = require('path');
const {task} = require('gulp');
task('version', require('@ecabuk/wp-version-bumper')([{
        file: path.resolve(__dirname, 'plugin.php'), // File path
        search: /Version: (.*)/,                     // Search RegExp
        replace: 'Version: #NEW_VERSION#'            // Replace String. #NEW_VERSION# will be replaced with the new version number.
    }]
));Usage
gulp version [--major|minor|path [version]] [--prerelease <alpha|beta|rc>]Displays the current version.
gulp versionIncreases the major version.
gulp version --majorSets minor version to 12.
gulp version --minor 12Sets version to 1.0.0.
gulp version --major 1 --minor 0 --patch 0Sets a pre-release version.
gulp version --minor --prerelease rc1.0.0
7 years ago