vojtajina / grunt-bump

Grunt.js plugin - Increment package version.
MIT License
651 stars 122 forks source link

Specific options by bump type #191

Closed GMartigny closed 4 years ago

GMartigny commented 8 years ago

Hi,

I can't find a way to configure differently bump tasks by type (patch, minor, major).

For example, I don't need to create a tag for a bump:patch, or I could want to have a different commit message.

It could be done with multiple options on the GruntFile

bump: {
    options: {
        tagMessage: "Release of the version %VERSION%.",
        prereleaseName: "beta"
    },
    patch: {
        options: {
            createTag: false,
            tagMessage: "Patch"
        }
    }
}
armoucar commented 8 years ago

Yes, I have a similar case in here.

I have to:

  1. promote a version first in my package json
  2. minify my files and add a banner with the new version at the top of them
  3. commit and push to the repository.

I think this could be done with multiple bump task types.

armoucar commented 8 years ago

Just had a look at the code and grunt bump-only solves my problem completely. :)