Browse Source

Build scripts: Fix exit codes

Daniel Rudolf 9 years ago
parent
commit
0f85f85367

+ 3 - 3
_build/deploy-phpdoc-branch.sh

@@ -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//\//_}"

+ 1 - 1
_build/deploy-phpdoc-release.sh

@@ -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//\//_}"

+ 2 - 2
_build/generate-badge.sh

@@ -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

+ 0 - 2
_build/github-deploy.sh

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