|
|
|
@ -25,13 +25,24 @@ function update {
|
|
|
|
return $rv
|
|
|
|
return $rv
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function update_if_no_vendors {
|
|
|
|
|
|
|
|
if [[ ! -d "vendor/" ]]; then
|
|
|
|
|
|
|
|
update
|
|
|
|
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
|
|
echo "This script requires a verb."
|
|
|
|
echo "This script requires a verb."
|
|
|
|
echo "VERBS:"
|
|
|
|
echo "VERBS:"
|
|
|
|
echo " update - Update dependencies with composer"
|
|
|
|
echo " update - Update dependencies with composer"
|
|
|
|
echo " test - If no vendor/ folder Update, then run phpunit tests."
|
|
|
|
echo " test - If no vendor/ folder Update, then run phpunit tests."
|
|
|
|
echo " clean - Remove all buildfiles and editor artifacts."
|
|
|
|
echo " testloud - If no vendor/ folder Update, then run phpunit tests with all"
|
|
|
|
echo " tidy - Remove all editor artifacts."
|
|
|
|
echo " optional output"
|
|
|
|
|
|
|
|
echo " clean - Remove all buildfiles and editor artifacts."
|
|
|
|
|
|
|
|
echo " tidy - Remove all editor artifacts."
|
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "For style points, you might consider targeting these with git-hooks"
|
|
|
|
echo "For style points, you might consider targeting these with git-hooks"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
@ -41,14 +52,12 @@ if [[ $cmd == "update" ]]; then
|
|
|
|
update
|
|
|
|
update
|
|
|
|
exit $?
|
|
|
|
exit $?
|
|
|
|
elif [[ $cmd == "test" ]]; then
|
|
|
|
elif [[ $cmd == "test" ]]; then
|
|
|
|
if [[ ! -d "vendor/" ]]; then
|
|
|
|
update_if_no_vendors
|
|
|
|
update
|
|
|
|
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
./vendor/bin/phpunit --testdox --stderr tests
|
|
|
|
./vendor/bin/phpunit --testdox --stderr tests
|
|
|
|
exit $?
|
|
|
|
exit $?
|
|
|
|
|
|
|
|
elif [[ $cmd == "testloud" ]]; then
|
|
|
|
|
|
|
|
update_if_no_vendors
|
|
|
|
|
|
|
|
./vendor/bin/phpunit --testdox --stderr --display-deprecations --display-errors --display-notices --display-warnings tests
|
|
|
|
elif [[ $cmd == "tidy" ]]; then
|
|
|
|
elif [[ $cmd == "tidy" ]]; then
|
|
|
|
tidy
|
|
|
|
tidy
|
|
|
|
elif [[ $cmd == "clean" ]]; then
|
|
|
|
elif [[ $cmd == "clean" ]]; then
|
|
|
|
|