Skip to content

Commit 5ee32a5

Browse files
Gradle & Travis Release Config
Configuring Travis for build and release. This was tested at https://github.com/ReactiveX/BuildInfrastructure
1 parent a2129d7 commit 5ee32a5

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ jdk:
55

66
sudo: false
77
# as per http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
8+
9+
script: gradle/buildViaTravis.sh
10+
after_success:
11+
- gradle/publishViaTravis.sh
12+
13+
secure: "HzRt91B6CLkBCxRXlo7V+F5L8SSHSW8dgkO8nAlTnOIK73k3QelDeBlcm1wnuNa3x+54YS9WBv6QrTNZr9lVi/8IPfKpd+jtjIbCWRvh6aNhqLIXWTL7oTvUd4E8DDUAKB6UMae6SiBSy2wsFELGHXeNwg7EiPfxsd5sKRiS7H4="
14+
secure: "MSZLPasqNKAC+8qhKQD3xO+ZbuOy65HpUN+1+KnoOLMkHCu/f4x60W1tpTAzn1DFEVpokHR0n3I4z4HpWybURDQfDHD1bB4IsznjCUBYA9Uo9Sb0U4TS17dQr8s7SORIjHDLGNSWETJjrA9TfuUV6HTVhRO1ECx3H+wuTwCVDN0="

gradle/buildViaTravis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This script will build the project.
3+
4+
echo -e 'Build Script => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
5+
6+
./gradlew -Prelease.useLastTag=true build

gradle/publishViaTravis.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# This script will upload to Bintray. It is intended to be conditionally executed on tagged builds.
3+
4+
echo -e 'Bintray Upload Script => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
5+
6+
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
7+
echo -e 'Bintray Upload => Starting upload ...\n'
8+
9+
./gradlew -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace
10+
else
11+
echo 'Bintray Upload => Not a tagged build so will not upload'
12+
fi

0 commit comments

Comments
 (0)