Skip to content

Commit

Permalink
Move env variables to travis settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudd committed Aug 31, 2014
1 parent 7666678 commit 1cd0b7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ script: 'travis_retry ./gradlew build'

after_success:
- scripts/travis-sonatype-publish.sh

env:
global:
- secure: m/sb1iqIHzL/xCANDf0PHBRtX4ihiccFFWsMWby5PiGDh5ncItjI+kU+Yrgdy/PwmSwwTfB5nXzCdcJe8nLADSLF5PPccuKKO63mGH/Vsai0SJt94+wr+JnBS+T1LmTrlvtlRFEcKjFhOQsnAeJL30iNtQWsoqNSgVrYqUaBdAM=
- secure: dMBw5H/o1VsmFX9vama8KWpS3ZbwSgVeNdwByfBgZz82ad1AkYPFN2QNt02qZsopeHCs3w91J1+2ULkEcGpi/eCjRNV449uQyx1DXB0pGkiGq9OAgeZhO/HiRAPqqzJRC4gxgOHBvfxaKm6ZD8THfExWJKTQfXrwFrh+9R4cL3g=
7 changes: 1 addition & 6 deletions scripts/travis-sonatype-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
# Based closely on material from
# http://benlimmer.com/2014/01/04/automatically-publish-to-sonatype-with-gradle-and-travis-ci.

if [ "$TRAVIS_REPO_SLUG" == "bumptech/glide" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "3.0a" ]; then
if [[ $(./gradlew -q getVersion) != *SNAPSHOT* ]]; then
echo 'Travis can only publish snapshots.'
return 0
fi

if [ "$SONATYPE_PUBLISH" == "true" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$SONATYPE_PUBLISH_BRANCH" ]; then
echo -e "Starting publish to Sonatype...\n"

./gradlew uploadArchives -PNEXUS_USERNAME="${NEXUS_USERNAME}" -PNEXUS_PASSWORD="${NEXUS_PASSWORD}"
Expand Down

0 comments on commit 1cd0b7c

Please sign in to comment.