Trigger a build.

This commit is contained in:
James Cole
2015-06-19 08:38:21 +02:00
parent e54ddcb8b0
commit 1c3bffdc50
2 changed files with 24 additions and 2 deletions

24
pu.sh
View File

@@ -9,9 +9,31 @@ then
phpunit --verbose
fi
# directories to look in:
dirs=("controllers" "database" "factories" "helpers" "models" "middleware" "repositories" "support")
if [ ! -z "$1" ]
then
phpunit --verbose tests/helpers/$1.php
for i in "${dirs[@]}"
do
firstFile="./tests/$i/$1.php"
secondFile="./tests/$i/$1Test.php"
if [ -f "$firstFile" ]
then
# run it!
phpunit --verbose $firstFile
exit $?
fi
if [ -f "$secondFile" ]
then
# run it!
phpunit --verbose $secondFile
exit $?
fi
done
fi
# restore .env file