Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
travis: improve our detection of whether we are on a pull request
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Mar 2017 23:33:30 +0000 (00:33 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Mar 2017 23:33:34 +0000 (00:33 +0100)
Reading the docs sometimes pays off

tools/internal/travis-sonarqube.sh

index d069347..406f86f 100755 (executable)
@@ -40,7 +40,7 @@ installBuildWrapper
 ctest --output-on-failure --timeout 100
 
 # Only run sonar on master (not on pull requests)
 ctest --output-on-failure --timeout 100
 
 # Only run sonar on master (not on pull requests)
-if [ `git rev-parse --abbrev-ref HEAD` != "master" ] ; then
+if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
   exit 0
 fi
 
   exit 0
 fi