Search code examples
angulargitnpmnpm-version

Set version in package.json to reference a version file


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?


Solution

  • 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