Run travis tests if TRAVIS_PULL_REQUEST is set and set to a number.

This commit is contained in:
Parker Moore 2014-07-16 19:46:25 -04:00
parent 70e535bee3
commit de9c591ffc
1 changed files with 6 additions and 2 deletions

View File

@ -4,10 +4,14 @@
# script/test # script/test
# script/test <hi> # script/test <hi>
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep -v '^site/' || { set -x
if [[ "$TRAVIS_PULL_REQUEST" != "" ]] || [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep -v '^site/' || {
echo "No lib files have changed, skipping Jekyll tests!" echo "No lib files have changed, skipping Jekyll tests!"
exit 0 exit 0
} }
fi
if [ -z "$1" ]; then if [ -z "$1" ]; then
TEST_FILES="test/test_*.rb" TEST_FILES="test/test_*.rb"