Skip to content

Instantly share code, notes, and snippets.

@dotnetCarpenter
Last active November 13, 2016 10:49
Show Gist options
  • Save dotnetCarpenter/bb6c2f040e11922cc8f81ef42a8054fd to your computer and use it in GitHub Desktop.
Save dotnetCarpenter/bb6c2f040e11922cc8f81ef42a8054fd to your computer and use it in GitHub Desktop.
Before you push hook for svg.js
#!/bin/sh
npm run build:test && npm run test:quick
# check how the test went
testCode=$?
[ "$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
Copy link
Author

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