Build scripts: Fix exit codes
This commit is contained in:
parent
32ea0508cf
commit
0f85f85367
@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
|
if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
|
||||||
echo "Skipping phpDoc deployment because this is not on the required runtime"
|
echo "Skipping phpDoc deployment because this is not on the required runtime"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
|
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
|
||||||
echo "Skipping phpDoc deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
|
echo "Skipping phpDoc deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
echo "Skipping phpDoc deployment because this pull request (#$TRAVIS_PULL_REQUEST) is not permitted to deploy"
|
echo "Skipping phpDoc deployment because this pull request (#$TRAVIS_PULL_REQUEST) is not permitted to deploy"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
||||||
|
@ -7,7 +7,7 @@ if [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
|
|||||||
echo "Skipping version badge deployment because it has been disabled"
|
echo "Skipping version badge deployment because it has been disabled"
|
||||||
fi
|
fi
|
||||||
if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] || [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
|
if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] || [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
|
||||||
[ "$DEPLOY_PHPDOC_RELEASES" != "true" ] && [ "$DEPLOY_VERSION_BADGE" != "true" ] && exit || echo
|
[ "$DEPLOY_PHPDOC_RELEASES" != "true" ] && [ "$DEPLOY_VERSION_BADGE" != "true" ] && exit 0 || echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
||||||
|
@ -37,8 +37,8 @@ wget -O "$TMP_BADGE" \
|
|||||||
|
|
||||||
# validate badge
|
# validate badge
|
||||||
if [ ! -f "$TMP_BADGE" ] || [ ! -s "$TMP_BADGE" ]; then
|
if [ ! -f "$TMP_BADGE" ] || [ ! -s "$TMP_BADGE" ]; then
|
||||||
printf 'Unable to generate badge; skipping...\n\n'
|
echo "Unable to generate badge; skipping..." >&2
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MIME type image/svg+xml isn't supported at the moment
|
# MIME type image/svg+xml isn't supported at the moment
|
||||||
|
@ -66,7 +66,5 @@ fi
|
|||||||
# push changes
|
# push changes
|
||||||
printf 'Pushing changes...\n'
|
printf 'Pushing changes...\n'
|
||||||
git push
|
git push
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
exit $EXIT_CODE
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user