Is there a way to tell npm version
not to add the "v" prefix to the git tags? The reason I'm trying to do this is because I'm using dockerhub to build the node/docker project and the tags is used in the version of the docker image, having a "v" there is unusual and pointless.
from-git will try to read the latest git tag, and use that as the new npm version. If run in a git repo, it will also create a version commit and tag. This behavior is controlled by git-tag-version (see below), and can be disabled on the command line by running npm --no-git-tag-version version .
Purpose. This NPM command allows easy incrementing in both package files and git tags, with a given tag or increment level. Run this in a package directory to bump the version and write the new data back to package.
NPM is a node package management tool used to download or publish node packages via the npm package registry. It comes bundled with node. js setup. npmjs offers numerous open-source packages, such as Lodash, React, and Chalk to accelerate the development process.
After the commit, it pushes the new commit and tag up to the server, and deletes the build/temp directory. Prevents throwing an error when npm version is used to set the new version to the same value as the current version. Commit and tag the version change.
If set to true, then the npm version command will tag the version using -s to add a signature. Note that git requires you to have set up GPG keys in your git configs for this to work properly.
Run git commit hooks when using the npm version command. Tag the commit when using the npm version command. Setting this to false results in no commit being made at all.
This behavior is controlled by git-tag-version (see below), and can be disabled on the command line by running npm --no-git-tag-version version . It will fail if the working directory is not clean, unless the -f or --force flag is set.
Use a .npmrc
file - you may already have one (it stores your configuration for npm). You can either have:
~/.npmrc
/var/myprojects/awesomeproject/.npmrc
Then, just specify the tag-version-prefix key in it like:
tag-version-prefix=""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With