]> source.dussan.org Git - sonarqube.git/commitdiff
Travis - support analysis of PR based on PR
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 16 Oct 2017 19:19:43 +0000 (21:19 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 16 Oct 2017 19:19:43 +0000 (21:19 +0200)
travis.sh

index fb8ace1f6d3750c769a693becffd0e23e5e92996..7d80c1242bc190217c554ffa9e761369443cd192 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -187,19 +187,15 @@ BUILD)
         -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
         -Dsonar.github.oauth=$GITHUB_TOKEN
 
-    if [ "$TRAVIS_BRANCH" == "master" ]; then
-      # analysis of short-living branch based on another short-living branch
-      # is currently not supported
-      mvn sonar:sonar \
-          -Dsonar.host.url=$SONAR_HOST_URL \
-          -Dsonar.login=$SONAR_TOKEN \
-          -Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \
-          -Dsonar.branch.target=$TRAVIS_BRANCH \
-          -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
-          -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
-          -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
-          -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-    fi
+    mvn sonar:sonar \
+        -Dsonar.host.url=$SONAR_HOST_URL \
+        -Dsonar.login=$SONAR_TOKEN \
+        -Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \
+        -Dsonar.branch.target=$TRAVIS_BRANCH \
+        -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
+        -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
+        -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
+        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
   else
     echo 'Build feature branch or external pull request'