Stash auto increment project version number

709 views Asked by At

Is there any way I could Auto Increment the Project version number (in Package.json) after the pull request from Develop to Master has been approved ?

Once the pull request is approved from Develop to Master I am looking for a way to automatically increment the version number in my projects Package.json file.

We are also using Bamboo to run our builds, I am also thinking is there a way to auto increment after the build is successful, how can we achieve this ?

Please suggest the appropriate design.

1

There are 1 answers

1
Melou On

What I do is that my CI runs npm version patch to update the package version. minor, major, specific version number, ... can also be used instead of patch.

By default this will also create a git tag with the version number. You can disable this with --no-git-tag-version.

After that you can have you CI push the created tag.