grunt-release-it

Interactive release task for Git repositories. Optionally release a build to distribution/component repository.

npm install grunt-release-it
9 downloads in the last day
50 downloads in the last week
148 downloads in the last month

Grunt Release It!

Interactive release task for Git repositories. Optionally release a build to distribution/component repository. Publish to npm.

Automatically increments version in package.json, commit, tag, push, publish, done.

Grunt plugin for the stand-alone Release It!

Getting Started

This plugin requires Grunt ~0.4.2

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-release-it --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-release-it');

The "release-it" task

See the Release It! for configuration options.

Configuration

In your project's Gruntfile, add a section named release-it to the data object passed into grunt.initConfig(). These are the options with their default values:

grunt.initConfig({
    'release-it': {
        options: {
            pkgFiles: ['package.json'],
            commitMessage: 'Release %s',
            tagName: '%s',
            tagAnnotation: 'Release %s',
            buildCommand: false
        }
    }
});

If you also want to release to "distribution repo", you'll need to provide the distRepo as well. Here are the additional options with their default values:

options: {
    distRepo: false,
    distStageDir: '.stage',
    distFiles: ['dist/**/*'],
    distBase: 'dist',
    publish: false
};

You must set distRepo to a git endpoint (e.g. 'git@github.com:webpro/awesome-component.git').

Usage

Make a "patch" release (increments the 0.0.x):

grunt release-it

Make a patch, minor, major or specific version release with e.g.:

grunt release-it:minor
grunt release-it:0.8.3
grunt release-it:2.0.0-rc.3

You can also do a dry run, which won't write/touch anything, but does output the commands it would execute, and shows the interactivity:

grunt release-it --dry-run

The Grunt options -v/--verbose, -f/--force, and -d/--debug or passed as-is, while --no-write is passed as --dry-run to Release It!

License

MIT

Analytics

npm loves you