From 9ae803c28372438e4724dd68e5607a15ab60ad02 Mon Sep 17 00:00:00 2001 From: Rob Spieldenner Date: Thu, 10 Sep 2015 13:03:01 -0700 Subject: [PATCH] Setup keys for travis builds --- .travis.yml | 14 +++++++------- buildViaTravis.sh | 23 +++++++++++++++++++++++ installViaTravis.sh | 0 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100755 buildViaTravis.sh mode change 100644 => 100755 installViaTravis.sh diff --git a/.travis.yml b/.travis.yml index 7872f7d7b1..ee282a1ffb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,12 @@ jdk: sudo: false install: "./installViaTravis.sh" script: "./buildViaTravis.sh" -env: - global: - - secure: JReOX/9ZzNHP0CWrw2KEQ699fcWH+59kR7WjJTPglYMhIDsrcQlSV+AKPfXVuEh71HanWDaEjVtw1i0nMiZGd8k8jgU5iMbOaO1PmpjTxEHB97vnh9xexYaPsL1wzKlj51fEfwLX26SS3z7kRrvT4tQp/2A11aLqNVLJENEJUrE= - - secure: BSCZkXsCLzPQmFrojsE9m5zdB7LUnUSVjtgDvvZjqjOac6HaKEr0uBxCIpizR/GPGZA4sNypuSD6jtsaHTU3TGKfNCTzz2QwIwvpVrmGNqXR3Tv/p+grNMEVCVA6P3jpMWY1P0zg7m+OTiyF6roAZXc6LftOzygox2lDPK85D3M= - - secure: UYgocA/3TXjgIaoZRmSCzA0Ed3xImJxuQUw6GV/HUeHWoQyCD5myBpQcdIkAaQsJnNWY6h587oL3yDvIVjycVb2/9uhUAQ5NHjz5oT4D4aNECpQvdcHivAtGPfH5jZV6Cj57Q5hLeedCG0oeWamiZcR6AlSkT/FMlP0lhAPJFNM= - - secure: GtgBxV/2hQ9kPXpTAY9Iq7gi8+DaGGgu7KuEtAUw0nLenl2CIY3GLU3cP0oAbvtKDcKlbmYhfTLgj7pDoDy4ZrfmCTBnKNoDqOAZjNfRLnrlEi3x2KL7VMgnWPqyemOHoAnGq3URXEr363GKNhBtrynehiXJNtVTxmOD0JS/Smg= cache: directories: - - $HOME/.gradle + - "$HOME/.gradle" +env: + global: + - secure: eCJZsdb6dhCyD9qnxzabonrqSn02l+vtoYX/v3DED7AZi5SnbC7iloy7borBm3yz9xcd5ajxuke+Y9eLzLx79DfE9B8Z2/xL1Yx2xSIgFBD8FgFAq62Okdi71SYwP11yGIqLNf0FWmT5UCWZ94nN0QzX7pfagWc2LQ/r+EI+XVs= + - secure: WVfJ5Cix+pIY5BKek9YeaSRKRnUFZZ7WUTDcfQ+64N+BoU0QUMoFt+VDaeigXKauDybUQ47SkVV7HdnBIwIO6wM1dVbw8UHWIa/Y346pxnCOqNsyk2eE6pqgIa2RoQgq2Jx34WBYJVtQ8eMvRF0H33jGUZefov64B5ocZVtf/yY= + - secure: Kj/AIbAO0Iao1umA0hct3aoJR5244m8R9/c9mmVPrtO/gwWin2r82kjdwT62RbQHZqGTTXfBNLUFe//QwQgkUhyJUIvLkmA6tjcJnmpWJUhpZoJMgzTxMueTebDCtsri8haFf5AUD5eAge6EIYcB0hQc4g2QTH9Thqiqa17m77U= + - secure: eKgq3A10rhjFS0oP4KtOvtc9ZcyDkAA/0NABsaMpnHW8phO+/nax3wUgMVzWyz4vzaItB56NmyenpE+3NP5PIoLBmxsOq8Cbt8mZAieWWg6oJdW5w/AMaVbvEnAoewNhxj0CCiSloBDSS+J6y79EdT5uh1vjMHkAQARJO6tVdt0= diff --git a/buildViaTravis.sh b/buildViaTravis.sh new file mode 100755 index 0000000000..17a33a5fb9 --- /dev/null +++ b/buildViaTravis.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./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}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then + echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' + case "$TRAVIS_TAG" in + *-rc\.*) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate + ;; + *) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ;; + esac +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew build +fi diff --git a/installViaTravis.sh b/installViaTravis.sh old mode 100644 new mode 100755