observing / pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit
MIT License
1.88k stars 150 forks source link

Ignore version number bump commits #17

Closed blakeembrey closed 9 years ago

blakeembrey commented 9 years ago

For example, when running npm version patch or doing a bower version update which makes a commit and tag.

3rd-Eden commented 9 years ago

Why would you want to ignore those commits? I would say it's especially important to run the hooks at that moment to ensure that you're not releasing a broken build?

blakeembrey commented 9 years ago

Fair enough. It was just a thought based on the duration some tests take and the fact that this commit shouldn't be changing anything that needs testing.

3rd-Eden commented 9 years ago

You can always skip these commits using the -n flag.

3rd-Eden commented 9 years ago

I see that npm also included support for git signing, so they might also be willing to add support for hook skipping: https://github.com/npm/npm/blob/master/lib/version.js#L148-L162

I think it would make more sense to solve this in npm & bower instead of this pre-commit module.

blakeembrey commented 9 years ago

Perfect, thank you! :smile: