mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
chore: add no php option to deploy scripts
This commit is contained in:
parent
7a65bc971d
commit
66b65a87a2
2 changed files with 18 additions and 16 deletions
|
@ -1,15 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$1" != '--without-validation' ]; then
|
||||||
for cmd in find xargs php git; do
|
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; }
|
command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; }
|
||||||
done
|
done
|
||||||
|
|
||||||
|
find . -name "*.php" | grep -v archive | xargs -n1 php -l
|
||||||
find . -name "*.php" -print0 | grep -va archive | xargs -0 -n1 php -l
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "not deploying b0rken code ;)"
|
echo "not deploying b0rken code ;)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$1" != '--without-validation' ]; then
|
||||||
for cmd in find xargs php git; do
|
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; }
|
command -v $cmd >/dev/null 2>&1 || { echo >&2 "I require $cmd but it's not installed. Aborting."; exit 1; }
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
find . -name "*.php" | grep -v archive | xargs -n1 php -l
|
find . -name "*.php" | grep -v archive | xargs -n1 php -l
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "not deploying b0rken code ;)"
|
echo "not deploying b0rken code ;)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
DEPLOY_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
|
Loading…
Reference in a new issue