Skip to content

Instantly share code, notes, and snippets.

@amogower
Created February 3, 2017 07:38
Show Gist options
  • Select an option

  • Save amogower/75c9636949aaa9987e667efce5dfcd8e to your computer and use it in GitHub Desktop.

Select an option

Save amogower/75c9636949aaa9987e667efce5dfcd8e to your computer and use it in GitHub Desktop.
Simple pre-commit test runner
#!/bin/sh
#
# Hook: pre-commit
# Desc: run tests on master branch
branch=`git rev-parse --abbrev-ref HEAD`
if [ "$branch" = "master" ]; then
make test
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment