grunt-bump icon indicating copy to clipboard operation
grunt-bump copied to clipboard

bump:git produce unwanted version

Open andreasciamanna opened this issue 8 years ago • 3 comments

Not sure if this is a bug or just a lack of knowledge from my side :)

I start with version 3.4.0.

Running grunt bump:git updates the version to that: 3.4.1-3.3.6-b2-264-g5d71.0

I see what bump does: it calls git describe --tags --always --abbrev=1 --dirty=-d which returns 3.3.6-b2-264-g5d71-d.

  • Why the minor version is also increased?
  • Why I even get an additional ".0" suffix?
  • How can I get just the git hash added to the version (like in the examples shown here by the way)?

andreasciamanna avatar Apr 28 '16 14:04 andreasciamanna

My configuration:

this.grunt.initConfig({
    pkg:  this.grunt.file.readJSON('package.json'),
    bump: {
        options: {
            files:         ['../sitepress.php'],
            commit:        false,
            createTag:     false,
            push:          false,
            globalReplace: true,
            prereleaseName: 'rc'
        }
    }
});

andreasciamanna avatar Apr 28 '16 14:04 andreasciamanna

bump

lzgrzebski avatar Oct 17 '16 15:10 lzgrzebski

I also get similar results as @andreasciamanna, but would like to have versioning as described in the documentation (just adding number of commits and commit hash). No luck configuring either grunt-bump nor the git-describe options... Any help would be appreciated! :)

helgeFox avatar Oct 22 '18 11:10 helgeFox