From 071eeea49500d4bf8e14153f037ec4f9932927bd Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Thu, 6 Aug 2015 13:25:08 -0700 Subject: [PATCH] add install script Travis will call assemble for the install. This avoids the need to repeat that work in the build step when using the default. --- .travis.yml | 1 + installViaTravis.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 installViaTravis.sh diff --git a/.travis.yml b/.travis.yml index 3268149bf..f80dc1ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,5 @@ language: java jdk: - oraclejdk8 sudo: false +install: "./installViaTravis.sh" script: "./buildViaTravis.sh" diff --git a/installViaTravis.sh b/installViaTravis.sh new file mode 100755 index 000000000..68e45a05f --- /dev/null +++ b/installViaTravis.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./gradlew assemble +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then + echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' + ./gradlew -Prelease.travisci=true assemble +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then + echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew assemble +fi