chore: add no php option to deploy scripts

This commit is contained in:
Andreas Hubel 2022-05-13 14:10:46 +02:00
parent 7a65bc971d
commit 66b65a87a2
2 changed files with 18 additions and 16 deletions

View file

@ -1,15 +1,16 @@
#!/usr/bin/env bash
if [ "$1" != '--without-validation' ]; then
for cmd in find xargs php git; do
command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; }
done
find . -name "*.php" -print0 | grep -va archive | xargs -0 -n1 php -l
find . -name "*.php" | grep -v archive | xargs -n1 php -l
if [ $? -ne 0 ]; then
echo "not deploying b0rken code ;)"
exit 1
fi
fi
echo ""
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`

View file

@ -1,15 +1,16 @@
#!/usr/bin/env bash
if [ "$1" != '--without-validation' ]; then
for cmd in find xargs php git; do
command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; }
done
find . -name "*.php" | grep -v archive | xargs -n1 php -l
if [ $? -ne 0 ]; then
echo "not deploying b0rken code ;)"
exit 1
fi
fi
echo ""
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`