Skip to content

Commit

Permalink
Merge pull request #641 from emccallum/enable-oss
Browse files Browse the repository at this point in the history
Enabling Travis
  • Loading branch information
chapj2001 authored Jun 25, 2018
2 parents 2b01410 + c7db961 commit 52682f5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: java
jdk: oraclejdk8
install: "./installViaTravis.sh"
script: "./buildViaTravis.sh"
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
env:
global:
- secure: A1ZGdyklE1FniXYhbN+mIljE9xpHRpg7Yz2uvL+1bojvlRm9omhCmnODO/aPF7S2SMOoDLEcCZSpmbXOLw+Io8asa3Miy0QyIurCp6kBg5Lkls+2UGGbzqkaFHzKXm12DWxbwqo5k+JRSGrR9X8+pzvyzK/nMunw/h39Vfoy8hc=
- secure: asAGLJNdvHvEsytezyjXzJWbKgSVYhC2EH11dbSr2VmxCV3gsaOi0u2jyV1wrnwq+VMDg/GvgqDDE452q8WvcKtUpgxPmujlbskSFhVXj692zHI/x4ZF302f9z/b6Ps57+bnF5s3Hl6wPAtOXm4Y+OwzFr+Ysytev+LXY+BX7QM=
- secure: QP5vDaIltt5pNz26SCH3n9n55YEuYPcpMLrolHtw9FeuVuvHnKe9QiKNGTREQFf22gZW6cCLCHrBlUS9L6aK2B9pNuu4l3nocjlIJEZ4nBioKtJCJ8s7nTNW5C8ANGDk6qfemjR0ILVGWJWdI+z/fiInVdDX9HYx3mCArhd/h8E=
- secure: tnnrvJpI2wUcB1LEoNpS3V3ZypqGKgZtl9uN1xpqOL1coviTMwaqFamuxDP1rkH+xb4t5qTsMazQTgM8ZvurZhXDPIXae/D1Go4Xst90ECq+OTif47FG6q4wgfeLVM4V1H8FjuPzaZdSolapLEAIz+FUx/FOZE3yHTDFhbR0Ct0=
23 changes: 23 additions & 0 deletions buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# This script will build the project.

if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$GRADLE_PUBLISH" == "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
16 changes: 16 additions & 0 deletions installViaTravis.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 52682f5

Please sign in to comment.