Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from rspieldenner/travis
Browse files Browse the repository at this point in the history
Travis setup
  • Loading branch information
elandau authored Sep 15, 2017
2 parents cb71049 + 77c1626 commit e64fe49
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"
cache:
directories:
- "$HOME/.gradle"
env:
global:
- secure: FkKx7tPnSS0uG70Iv8cIsNynsA7BYbElQ2TRWpcYY4LBYfKiB2+Z/mRex8d0O92E1+ZqHIzXyAMpGy6F37sNUCrOG9ZkY8IYyx2joNHjgFqMM6dJg2XY22liBwATq5ectzqdorLY3ESGe0I6YKVum7wuRyNpVDc+wOn3SHJDrDM=
- secure: Ew05M9oZ/hH/bdpar3ajBzef1Jeu5+HMD4weMuaVcEZyBhDcQla54gDmaxqu6/drKb/z/F+WwAw6P7ehx8R6n/8ghw9tdR2LcFo5W67rKk9S6iPOltBfT3tn8hHXLJewunK8pJ3gp4bsqFIoXKAtQFvznDv16ERa/Qa+4oWSAsk=
- secure: aNmFi1Ai3jdjRw8h4B/TFowaigk+9nh78YAkYQ69iDi2J2PkKZvQRYu0ATQBHud1XnlQH1dKv54k8ofqGAymsMuQ7PfPXM0fEImdU0tv2QLBaINGl2TP+vjW7i02OUDQOm7Hv5F1XZHQcwh5r+34HB5j48ZSUNFOQSFIWNZIYro=
- secure: JDzobrcViIlXdiw0hING6Wn0FgU35m7U59rikptaafOwyoAtDbLM7tkymu7rw8MeOzxSsmv8MSU5VHgqFEpAVZ5tF8WW+3IXkcMnF/6VBSwodfS5ZtN0zdOp3p2rjvTnvUlexmur6UFf7pZFAhY/X6WedBq3Yhc1MRWPjNsH4Zo=
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 --stacktrace
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 --stacktrace
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 --stacktrace
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew build --stacktrace
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 --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true assemble --stacktrace
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 --stacktrace
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew assemble --stacktrace
fi

0 comments on commit e64fe49

Please sign in to comment.