From 352f509fb9b90f0adf12f9ccb9c22123320d91af Mon Sep 17 00:00:00 2001 From: Sebastian Peters Date: Wed, 21 Nov 2018 22:51:45 +0100 Subject: [PATCH] Enhance after_success for Travis CI Use default bash if-then-else block with semicolon after each command and fix spelling for "incompatibility". Don't do `mvn clean` b/c we need the test results for the following tasks and don't need to rebuild everything. --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e12ba2fb9..38e83f6df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,10 @@ script: mvn test -DskipAssembly after_success: # TODO delete following if statement after fix of https://github.com/cobertura/cobertura/issues/271 - - if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] || [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; - then mvn clean cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report com.updateimpact:updateimpact-maven-plugin:submit -Ptravis-coveralls,update-impact -DskipAssembly; - else echo "Not reporting coverage for $TRAVIS_JDK_VERSION due to incomatibility or to save performance"; + - if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] || [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then + mvn cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report com.updateimpact:updateimpact-maven-plugin:submit -Ptravis-coveralls,update-impact -DskipAssembly; + else + echo "Not reporting coverage for $TRAVIS_JDK_VERSION due to incompatibility or to save performance"; fi; env: