Set version in package.json to reference a version file

514 Views Asked by At

Is there a way to use npm-version and not commit, to only change the version but leave it uncommitted?

I know that I can use npm version {my-version}, but is there an argument flag I can add so that the change isn't committed?

1

There are 1 best solutions below

0
SwissCodeMen On BEST ANSWER

You can be disabled this on the command line by running npm --no-git-tag-version {my-version}. Then it will not create a version commit and version tag.

This will fail, if the working directory is not clean, unless the -f or --force flag is set.

see also npm-version documentation