Skip to content

Commit

Permalink
Updating build script to limit sonarqube to master.
Browse files Browse the repository at this point in the history
  • Loading branch information
aweigold committed Jul 28, 2018
1 parent 990ec64 commit dbd7ce3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e # Exit with nonzero exit code if anything fails
SOURCE_BRANCH="master"

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew build
Expand All @@ -13,13 +14,15 @@ else
-PnexusUsername=$sonatypeUsername \
-PnexusPassword=$sonatypePassword

./gradlew sonarqube \
-Penable.signing=true \
-Psigning.keyId=D1115C87 \
-Psigning.password=$signingPassword \
-Psigning.secretKeyRingFile="$TRAVIS_BUILD_DIR/signing.gpg" \
-PnexusUsername=$sonatypeUsername \
-PnexusPassword=$sonatypePassword
if [ "$TRAVIS_BRANCH" == "$SOURCE_BRANCH" ]; then
./gradlew sonarqube \
-Penable.signing=true \
-Psigning.keyId=D1115C87 \
-Psigning.password=$signingPassword \
-Psigning.secretKeyRingFile="$TRAVIS_BUILD_DIR/signing.gpg" \
-PnexusUsername=$sonatypeUsername \
-PnexusPassword=$sonatypePassword
fi

./gradlew publish \
-Penable.signing=true \
Expand Down

0 comments on commit dbd7ce3

Please sign in to comment.