Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Before you push hook for svg.js
npm run build:test && npm run test:quick
# check how the test went
[ "$testCode" = 0 ] || echo "Your current build does not pass our unit tests - please make them pass before you push"
# revert artifacts created during build
git reset --hard $(git log -1 --pretty=%H)
# exit with the test exit code
exit $testCode

dotnetCarpenter commented Nov 12, 2016

Put this file in your local svg.js repository, in the .git/hooks folder and make it executable sudo chmod +x .git/hooks/pre-push.


dotnetCarpenter commented Nov 12, 2016

To disable the check write git push --no-verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment