Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2470ee2

Browse files
committed
Update sonar PR external
1 parent dc49e49 commit 2470ee2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.travis/run_sonar_scanner.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,21 @@ fi
3232

3333
#Are we running on utPLSQL repo and not an external PR?
3434
echo "Check if we running from develop or on branch"
35-
if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "${TRAVIS_PULL_REQUEST_SLUG}" = "${TRAVIS_REPO_SLUG}" ] && \
36-
[[ ! "${BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|"${MAIN_DEV_BRANCH}")$ ]]; then
35+
if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [[ ! "${BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|"${MAIN_DEV_BRANCH}")$ ]]; then
3736

3837
echo "" >> sonar-project.properties
3938
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
4039
echo "Updating sonar properties to include branch ${BRANCH}"
4140
add_sonar_property "${BRANCH_SONAR_PROPERTY}" "${BRANCH}"
4241
add_sonar_property "${BRANCH_SONAR_TARGET_PROPERTY}" "${MAIN_DEV_BRANCH}"
43-
else
42+
elif [ "${TRAVIS_PULL_REQUEST_SLUG}" = "${TRAVIS_REPO_SLUG}" ]
4443
echo "Updating sonar properties to include pull request ${BRANCH}"
4544
add_sonar_property "${PR_SONAR_TOKEN_PROPERTY}" "${GITHUB_TRAVISCI_TOKEN}"
4645
add_sonar_property "${PR_SONAR_BRANCH_PROPERTY}" "${BRANCH}"
4746
add_sonar_property "${PR_KEY_PROPERTY}" "${PR}"
4847
add_sonar_property "${PR_SONAR_BASE_PROPERTY}" "${PR_BRANCH}"
48+
else
49+
echo "PR from external source no changes to properties."
4950
fi
5051
else
5152
echo "No need to update sonar we building on release or develop"

0 commit comments

Comments
 (0)