1.0.0 • Published 6 years ago

@ecabuk/wp-version-bumper v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

@ecabuk/wp-version-bumper

Install

yarn add -D @ecabuk/wp-version-bumper

Setup

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 version

Increases the major version.

gulp version --major

Sets minor version to 12.

gulp version --minor 12

Sets version to 1.0.0.

gulp version --major 1 --minor 0 --patch 0

Sets a pre-release version.

gulp version --minor --prerelease rc