Browse Source

Additionally simplify decision if after success should be executed

Stefan Profanter 6 years ago
parent
commit
f7ef0bb16e
2 changed files with 3 additions and 4 deletions
  1. 2 3
      tools/travis/travis_linux_after_success.sh
  2. 1 1
      tools/travis/travis_linux_script.sh

+ 2 - 3
tools/travis/travis_linux_after_success.sh

@@ -2,11 +2,10 @@
 set -ev
 
 # We only want to push the docs once, so we just take the travis run where MINGW=true which is only enabled once
-if [ -z ${MINGW+x} ]; then
+if [ $MINGW = "true" ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
     echo "=== Executing after_success scripts ==="
     # List branches where the doc should be pushed to the webpage
-    if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && (
-        [ "${TRAVIS_BRANCH}" = "master" ] || [ "${TRAVIS_BRANCH}" = "0.3" ]); then
+    if [ "${TRAVIS_BRANCH}" = "master" ] || [ "${TRAVIS_BRANCH}" = "0.3" ]; then
         sh ./tools/travis/travis_push_doc.sh
         sh ./tools/travis/travis_push_coverity.sh
     fi

+ 1 - 1
tools/travis/travis_linux_script.sh

@@ -270,7 +270,7 @@ else
         # only run coveralls on main repo and when MINGW=true
         # We only want to build coveralls once, so we just take the travis run where MINGW=true which is only enabled once
         echo -e "\r\n== -> Current repo: ${TRAVIS_REPO_SLUG} =="
-        if [ -z ${MINGW+x} ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ]; then
+        if [ $MINGW = "true" ] && [ "${TRAVIS_REPO_SLUG}" = "open62541/open62541" ]; then
             echo -en "\r\n==   Building coveralls for ${TRAVIS_REPO_SLUG} ==" && echo -en 'travis_fold:start:script.build.coveralls\\r'
             coveralls -E '.*/build/CMakeFiles/.*' -E '.*/examples/.*' -E '.*/tests/.*' -E '.*\.h' -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -r ../ || true # ignore result since coveralls is unreachable from time to time
             echo -en 'travis_fold:end:script.build.coveralls\\r'