This plugin is being deprecated in favor of grunt-release, and will be eventually unpublished. Please migrate.
Commit the changes and tag the last commit with a version from provided JSON file. If there is nothing to commit, the task will tag the current last commit.
Use npm to install and save the plugin into
npm install grunt-tagrelease --save-dev
In your project's Gruntfile, add a section named
tagrelease to the data object passed into
grunt.initConfig(). This is a
simple task, and does not conform to multi task options & files input types! All available configuration styles are
This is the most verbose form of the configuration with default options and a version from a JSON file:
Version from a
version property, and no prefix:
Version retrieved from a function passed to the
version property, and enabled annotated tags:
Default options and a new version from a JSON file:
Default options and a new version expanded from a template:
Default options and a new version passed directly:
Default options and a new version from a function:
New version that will be used as a new tag name. Has a priority over the
file option below. Can be a string or a
function that returns a string. You have to define either this, or a
file option below, otherwise the task won't know
what should be the new tag.
Path to the JSON file with version that should be used as a new tag. You have to define either this, or a
option above, otherwise the task won't know what should be the new tag.
Whether to commit any un-staged changes before tagging. Does the
git commit -a command.
Message to be used in commits, and annotated tags. Available is one token:
%version%- Will be replaced with a new version, without a prefix.
Tag prefix. Set to
v to have tags line
Whether the new tag should be annotated. If enabled, the tag will receive a message from
In this example, we create a release task that handles everything needed to build a new release of a project:
// Tasks configurationgrunt;// Load the pluginsgrunt;grunt;grunt;grunt;// Release alias taskgrunt;
And now you can call this command to create a new minor release of a project: