From 8427a23c60724d84a9b80ec7fe9ec044af9f3a96 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Wed, 4 Oct 2017 17:36:06 +0200 Subject: [PATCH] Always 'fetch --unshallow' in Travis builds --- travis.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/travis.sh b/travis.sh index ec9c9927b5a..2ee03ac7aec 100755 --- a/travis.sh +++ b/travis.sh @@ -128,16 +128,17 @@ BUILD) export MAVEN_OPTS="-Xmx1G -Xms128m" MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION -Dtests.es.logger.level=WARN -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" - if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - echo 'Build and analyze master' - # Fetch all commit history so that SonarQube has exact blame information - # for issue auto-assignment - # This command can fail with "fatal: --unshallow on a complete repository does not make sense" - # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50). - # For this reason errors are ignored with "|| true" - git fetch --unshallow || true + # Fetch all commit history so that SonarQube has exact blame information + # for issue auto-assignment + # This command can fail with "fatal: --unshallow on a complete repository does not make sense" + # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50). + # For this reason errors are ignored with "|| true" + git fetch --unshallow || true + + if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + echo 'Build and analyze master' mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \ $MAVEN_ARGS \ -Pdeploy-sonarsource,release -- 2.39.5