Created
December 10, 2013 09:20
-
-
Save Ulv/7887899 to your computer and use it in GitHub Desktop.
phpunit tests on git post-update hook (push in master)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TEST_PATH='/home/ulv/PhpstormProjects/kinetic/oncologytest/tests/' | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ "master" == "$branch" ]; then | |
phpunit $TEST_PATH | |
rc=$? | |
if [[ $rc != 0 ]] ; then | |
exit $rc | |
fi | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment