Permalink
Browse files

0.5.x use travis for releases

  • Loading branch information...
brharrington committed Feb 8, 2016
1 parent 468a39b commit 801133b0082cfdfc90361ef90ac687bd33ed9fae
Showing with 28 additions and 0 deletions.
  1. +2 −0 .travis.yml
  2. +10 −0 build.gradle
  3. +16 −0 gradle/buildViaTravis.sh
View
@@ -1,6 +1,8 @@
language: java
jdk:
- oraclejdk8
sudo: false
script: gradle/buildViaTravis.sh
env:
global:
- secure: JjyE1E+adlM+CitIVpwb9HewJDjY3ZVjDgu8eYcTY+wXRNAvpcNH3gtUUClisXLZ3X4Kd8f875XH7/vUuOtJqMvQDQfUWPbCinE5GDzoRl2S5ZHoRA0H584bqilO7CXjjGMfTBlbw8A5auZ6Vf+n4zTZxgJNvDtple6WRoz/hzg=
View
@@ -47,4 +47,14 @@ configure(subprojects) {
showStandardStreams = true
}
}
// support for snapshot/final releases with the various branches RxJava uses
nebulaRelease {
addReleaseBranchPattern(/\d+\.\d+\.\d+/)
addReleaseBranchPattern('HEAD')
}
if (project.hasProperty('release.useLastTag')) {
tasks.prepare.enabled = false
}
}
View
@@ -0,0 +1,16 @@
#!/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 -Prelease.useLastTag=true 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 --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew -Prelease.useLastTag=true build
fi

0 comments on commit 801133b

Please sign in to comment.