From e89ef5307967072f92fad9494dc586e1028971e0 Mon Sep 17 00:00:00 2001 From: Rob Spieldenner Date: Tue, 10 Mar 2015 15:19:46 -0700 Subject: [PATCH] With encrypted keys --- .travis.yml | 11 +++++------ buildViaTravis.sh | 15 +++++++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63f441ef..abdbb54c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,9 @@ language: java - jdk: - - oraclejdk7 - +- oraclejdk7 sudo: false -# as per http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ - -# script for build and release via Travis to Bintray script: buildViaTravis.sh +env: + global: + - secure: Ps7+oTi5FfjwJ7tQ8G51wk30ZHqB1P4ZNXsGisn+r/8IJRxPs6VNIF/dPSkWLERs1tBvMG2sRz9nxaIwxXJwHXOkoBL/SXZHzOYwKTlsNcu72B6czxepIb0OAGWKAv6aCk9vAJkRzGX2Ogy+Hnn8AuQlPAPOplRjZm1AXj6smGM= + - secure: C/RoUcQGZ6wB1nHnLN7dGMCbpjOObaviuXFxv5ZtocKfALmOZg6gOye5/LyJwvLwMaKtI434dHFvY29FIO0ntclx48xPYCjg6GsmzJOwQcwlLqIV1HQMczFDiYlMFSUbHn9d+JbwXxdd13g98aHtEif73bI0SXevyiqv4n/XsVo= diff --git a/buildViaTravis.sh b/buildViaTravis.sh index b8243106..139be5ea 100644 --- a/buildViaTravis.sh +++ b/buildViaTravis.sh @@ -3,14 +3,21 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew -Prelease.useLastTag=true build + ./gradlew build elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace + ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace + case "$TRAVIS_TAG" in + *-rc\.*) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate + ;; + *) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final + ;; + esac else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew -Prelease.useLastTag=true build + ./gradlew build fi