Build scripts: Fix exit codes

This commit is contained in:
Daniel Rudolf 2016-01-14 22:57:31 +01:00
parent 32ea0508cf
commit 0f85f85367
4 changed files with 6 additions and 8 deletions

View file

@ -2,17 +2,17 @@
if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
echo "Skipping phpDoc deployment because this is not on the required runtime"
exit
exit 0
fi
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
echo "Skipping phpDoc deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
exit
exit 0
fi
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "Skipping phpDoc deployment because this pull request (#$TRAVIS_PULL_REQUEST) is not permitted to deploy"
exit
exit 0
fi
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"

View file

@ -7,7 +7,7 @@ if [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
echo "Skipping version badge deployment because it has been disabled"
fi
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
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"

View file

@ -37,8 +37,8 @@ wget -O "$TMP_BADGE" \
# validate badge
if [ ! -f "$TMP_BADGE" ] || [ ! -s "$TMP_BADGE" ]; then
printf 'Unable to generate badge; skipping...\n\n'
exit 0
echo "Unable to generate badge; skipping..." >&2
exit 1
fi
# MIME type image/svg+xml isn't supported at the moment

View file

@ -66,7 +66,5 @@ fi
# push changes
printf 'Pushing changes...\n'
git push
EXIT_CODE=$?
echo
exit $EXIT_CODE