Skip to content

ecabuk/wp-version-bumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published