I have a circleci script that runs my builds and tests and then on the master branch deploys to production. I would like to be able to increment the package version whenever a deploy happens, I have added the following in my yml file
- run: name: bump package version command: | npm version prerelease --preid=alpha -m "Bumped version number to %s [ci skip]" git push origin master git push --tags
However when the deploy runs I get an error
Command failed: git commit -m Bumped version number to 4.0.1-alpha.7 [ci skip]
It feels like this should be possible since the commit message tells CircleCI to skip the commit, how can I accomplish this?
This can’t be left to the developers to do prior to commits since this could be forgotten and then would not have an incremented tagged version in git at the time of the deployment