Skip to content

Instantly share code, notes, and snippets.

@saystone
Created January 30, 2018 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saystone/5e4fab46e5e7c904f8c030183b6d9a0b to your computer and use it in GitHub Desktop.
Save saystone/5e4fab46e5e7c904f8c030183b6d9a0b to your computer and use it in GitHub Desktop.
git hook for linting & building before push
#!/usr/bin/env bash
echo === pre-push: STARTED
npm run lint && npm run build
if [ ! $? -eq 0 ]
then
echo "=== pre-push: FAILED"
exit 1
fi
echo "=== pre-push: PASSED"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment