diff options
author | Tom <thomas.verin@sonarsource.com> | 2017-08-21 10:51:41 +0200 |
---|---|---|
committer | tomverin <thomas.verin@sonarsource.com> | 2017-08-21 14:02:01 +0200 |
commit | 3d352a5b92e8eef98a6048d65768d5d212e84885 (patch) | |
tree | 60eb584ffe88e1a29f43317d93cb5fe2cca76582 /travis.sh | |
parent | 622c47bd6f371157bef06fad1b10c5befc888fa9 (diff) | |
download | sonarqube-3d352a5b92e8eef98a6048d65768d5d212e84885.tar.gz sonarqube-3d352a5b92e8eef98a6048d65768d5d212e84885.zip |
BUILD-495 remove code duplication in build script
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/travis.sh b/travis.sh index c1fb2fbf84b..fa5336b652d 100755 --- a/travis.sh +++ b/travis.sh @@ -141,18 +141,18 @@ BUILD) mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \ $MAVEN_ARGS \ -Pdeploy-sonarsource,release + + INCREMENTAL=true + # Triggers a full analysis for every build number ending with 0 if [[ "$TRAVIS_BUILD_NUMBER" == *0 ]]; then - mvn sonar:sonar \ - -Dsonar.host.url=$SONAR_HOST_URL \ - -Dsonar.login=$SONAR_TOKEN \ - -Dsonar.projectVersion=$INITIAL_VERSION - else - mvn sonar:sonar \ - -Dsonar.incremental=true \ + INCREMENTAL=false + fi + + mvn sonar:sonar \ + -Dsonar.incremental=$INCREMENTAL \ -Dsonar.host.url=$SONAR_HOST_URL \ -Dsonar.login=$SONAR_TOKEN \ -Dsonar.projectVersion=$INITIAL_VERSION - fi elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo 'Build release branch' |