Skip to content

Commit 1354b0d

Browse files
authored
Merge pull request #97 from ExpediaDotCom/bug_fix
moving sonatype creds check only if when we're deploying the artifacts
2 parents 41825dd + b93194e commit 1354b0d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.travis/deploy.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ PASSWORD=${SONATYPE_PASSWORD}
88
SHA=${TRAVIS_COMMIT}
99
TAG_NAME=${TRAVIS_TAG}
1010

11-
if [[ -z "${USERNAME}" || -z "${PASSWORD}" ]]; then
12-
echo "ERROR! Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
13-
exit 1
14-
fi
1511

1612
if [[ "${BRANCH}" == 'master' && "${PULL_REQUEST}" == 'false' ]] || [[ -n "${TAG_NAME}" ]]; then
13+
14+
if [[ -z "${USERNAME}" || -z "${PASSWORD}" ]]; then
15+
echo "ERROR! Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
16+
exit 1
17+
fi
1718
if [[ ! -z "${TAG_NAME}" ]]; then
1819
echo "Ensuring that pom <version> matches ${TAG_NAME}"
1920
./mvnw org.codehaus.mojo:versions-maven-plugin:2.5:set -DnewVersion=${TAG_NAME}

0 commit comments

Comments
 (0)