Skip to content

Commit a700903

Browse files
committed
Cosmetics
1 parent 13caf51 commit a700903

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

sonar-scanner.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#/bin/bash -e
22

3-
if [ "$TRAVIS_BRANCH" == 'develop' ]; then
4-
TARGET_BRANCH='master'
5-
else
6-
TARGET_BRANCH='develop'
7-
fi
8-
93
sonar_scanner() {
104
local params="$@"
115

@@ -18,15 +12,25 @@ sonar_scanner() {
1812
-Dsonar.exclusions='**/tests/**/*.*' \
1913
-Dsonar.links.ci='https://travis-ci.com/splitio/php-client' \
2014
-Dsonar.links.scm='https://github.com/splitio/php-client' \
21-
-Dsonar.pullrequest.provider='GitHub' \
22-
-Dsonar.pullrequest.github.repository='splitio/php-client' \
2315
"${params}"
2416

2517
return $?
2618
}
2719

2820
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
29-
sonar_scanner -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH -Dsonar.pullrequest.base=$TRAVIS_BRANCH
21+
sonar_scanner \
22+
-Dsonar.pullrequest.provider='GitHub' \
23+
-Dsonar.pullrequest.github.repository='splitio/php-client' \
24+
-Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST \
25+
-Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
26+
-Dsonar.pullrequest.base=$TRAVIS_BRANCH
3027
else
31-
sonar_scanner -Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.branch.target=$TARGET_BRANCH
28+
if [ "$TRAVIS_BRANCH" == 'develop' ]; then
29+
TARGET_BRANCH='master'
30+
else
31+
TARGET_BRANCH='develop'
32+
fi
33+
sonar_scanner \
34+
-Dsonar.branch.name=$TRAVIS_BRANCH \
35+
-Dsonar.branch.target=$TARGET_BRANCH
3236
fi

0 commit comments

Comments
 (0)