Skip to content

Commit

Permalink
Merge pull request #9 from rspieldenner/travis
Browse files Browse the repository at this point in the history
Fixes #8. Add travis build
  • Loading branch information
brharrington committed May 16, 2016
2 parents 3573aac + 9a8fa90 commit 7f95292
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: java
jdk:
- oraclejdk8
sudo: false
install: "./installViaTravis.sh"
script: "./buildViaTravis.sh"
env:
global:
- secure: nm4dC+9pWMUkUvwtGzIdV/0uMXTltQhEFuMPmEE3ZixNrQZ6ceCN/XOxnjyEAV2b0gai1I2VC2li049jfcBywb+LPUslRJF70Q9fyHofHEaWFEqH3bq4E3H6EGz98NzLskGNzwOuplCqrKtEjGcRFzsvRQu2b9BCAPepRhfRQx2yNclJdDpCqpOQFd2O1zVPeZ/nAhgtT+u2+rRcPADstaUWaKxdxghSIcUqVp+ZmyV54/q5KIA3UkCP+JH4QYYj+AqVyknCh4H9GA2h5APn9dvA8nDhUkpm8svXOXEbAUkaDGswPcKuRcQrJ2Lws69fLgLJ36miKMxNPwZ5+g9LPPYRWtGXUJeYbyce4XM3r4+/Cn9t4NiSW3idtknckJTvnL9xQXTxANYBYyCZ3KtmgnXzAr2za9UJGeTFj+mbhAhXOSyb1RRWLWmvPUomza+ppTK+zPWr84Onm4jx11cBEfJdauWH8dowD3NSl9lOawLmMKoSaRnYPNKhVrd11xZGo7RdpR00x2LseN613XB/v83qis3YCi7wIWElnVRSdf0W8fZQv41aDdhavuBv4RxRNKSIRYL3Dz9n/vJFidwVczTqspXFUHQTAf9eSL/hu9TN7xGKy5uNSVwuAHs8BCnuQ2h9XS3hLuqTfFzj4hxsB9q1UPXlxQP01jwGGNZaSZM=
- secure: dfTil7IK/Il9bc9Rn9tGx4MQl4B1lSfHZgFVCSHaw/P0x7KaXxj2iOJJV6MPKYk1GdVGhNZP7Ps6skUcYkKYfzxUESd5QZPqk5g2k4uoa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ZdeX4uQsz7iDmj8LaukcZC+qd9N8FBy+KdtjcMPVrx21YyV0lV+3mU6V+MYKRKi0nixwBz4VhC6/czcf6IAyTnZLwjy/4MUnJVLM9U74lYMDB3WOjQXT/vCxbJhQGBdThpW7AYLW7VpfeKav+Kc+znLZLW+/11tmZi+HP2E7uzPFkmWCvYk=
- secure: sF2t8brv5wVEY/hc/VAXun0NN/99zQUrnQnUz2n9b3hE/9twt3puNilI9oQYVS1IgNgvrkYdgzYzr5siUZy4ECs1v3+mfMwPR1pKL9nlEx4skFq4LehppvNbdnjTjdREAkZSMVEE8F901EiQs6A1aHs/R0RihT64aq76sWU8wmdv9vwjQ3Xl/0+rSszcPGw0vuGIKEyQrypecdDVZB13L7RUzOKhCissUh4edzGU7WW3kmtZBkaxrsMA4f6ZrwzoUpo6VBP7nN+SEae5mCaBzq4N3sDDelegIsc7NnFlXqfjn8ewgZ8lvrIGxXHqxgp7OfapXNtn+64aupGJH7OwFJm1OnwiPU45v0Pch4lu0jVEwbUtJOvdL78EEL7yBniqTFOqnjyJEcu0nT8gzJv4l7QFiD6siACTnF6NTnzEdDHW058RNA7Y9qFynyJ9L71Vz4GPtsKu9pDn2OlgR7BwQH1H/2Xl2QxqKvW59EOhRcuTfKfjGol7UjjMAENrWRTTOFzwcxjiRTx6h+O+fSc7E1lREFCcln5w/zjbQxzFVDD8je+A9mSSITgt3LT6YH6ng6ML9Ft8aCbgqllBrF1MBivmpBkxJIApd1vW8LClxUOYj0NyTAkFi4kBsPCKsd2A4W97nKUeqxluoPOcn8QjnF2I0UN70hgnj/C0GMJ3Kb4=
cache:
directories:
- "$HOME/.gradle/caches"
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" ]; 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 7f95292

Please sign in to comment.