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,14 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
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
|
||||
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
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "not deploying b0rken code ;)"
|
||||
exit 1
|
||||
find . -name "*.php" | grep -v archive | xargs -n1 php -l
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "not deploying b0rken code ;)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
17
deploy.sh
17
deploy.sh
|
@ -1,14 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
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
|
||||
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
|
||||
find . -name "*.php" | grep -v archive | xargs -n1 php -l
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "not deploying b0rken code ;)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue