PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, October 21, 2022

[FIXED] When running `npm version` scripts, how to prevent a new commit from being made

 October 21, 2022     npm, npm-scripts     No comments   

Issue

When I run npm version patch, a new commit will be made. I don't want it.

The doc is pretty vague. The flag I guess is relevant is commit-hooks, but I'm not sure how to use it. There's no examples.

I've tried different patterns, for example:

npm version patch --commit-hooks=false

npm version patch --commit-hooks false

But it doesn't seem to work.


Solution

The --commit-hooks argument determines if Git Hooks are run on the commit creation.

The command you want is npm version patch --git-tag-version false

Tag the commit when using the npm version command. Setting this to false results in no commit being made at all.



Answered By - 0xLogN
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing