Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions sonar-scanner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
-Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
-Dsonar.pullrequest.base=$TRAVIS_BRANCH
else
if [ "$TRAVIS_BRANCH" == 'develop' ]; then
TARGET_BRANCH='master'
if [ "$TRAVIS_BRANCH" == 'master' ]; then
sonar_scanner \
-Dsonar.branch.name=$TRAVIS_BRANCH
else
TARGET_BRANCH='develop'
if [ "$TRAVIS_BRANCH" == 'develop' ]; then
TARGET_BRANCH='master'
else
TARGET_BRANCH='develop'
fi
sonar_scanner \
-Dsonar.branch.name=$TRAVIS_BRANCH \
-Dsonar.branch.target=$TARGET_BRANCH
fi
sonar_scanner \
-Dsonar.branch.name=$TRAVIS_BRANCH \
-Dsonar.branch.target=$TARGET_BRANCH
fi