Wednesday, August 16, 2017

Is it possible to add SVN hooks to NPM similar to git hooks?

Leave a Comment

I am looking to add an npm script that will run my linting and tests before svn commit happens.

If the linting or tests fail I'd like the commit to stop, just the same as it would with a git commit hook.

Does anyone know of a package? I have been searching with no real luck.

3 Answers

Answers 1

This would be an SVN pre-commit hook. The downside (IMO) in comparison to git is the hook code will run on the SVN server, whereas with git it would run on the local environment.

Answers 2

TortoiseSVN has the option to run client side precommit hooks. So you can try using it or any other client with same option. If not - @quickshiftin is right - "clean" SVN (command line client) supports only server side commit hooks. You can also take a look on this question.

Answers 3

I recommend using TortoiseSVN, it contains all the features you're looking for in a simple interface. Plus, it makes repositories that much easier to manage.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment