Skip to content

Commit 6726fe3

Browse files
build config for releasing
1 parent cd647f6 commit 6726fe3

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,18 @@ jdk:
66
before_install:
77
- export DISPLAY=:99.0
88
- sh -e /etc/init.d/xvfb start
9+
10+
# script for build and release via Travis to Bintray
11+
script: gradle/buildViaTravis.sh
12+
13+
# cache between builds
14+
cache:
15+
directories:
16+
- $HOME/.m2
17+
- $HOME/.gradle
18+
env:
19+
global:
20+
- secure: ey2J74wtmQqSCoDHlUhH8B6oS2mHscLQIWCTZtzMnSgv6Y6FiKK2gKWYVGQo0p1V84sZFQnMB+V1f6BmX265MYcuzZESZQAcQRE1RnFH3kZ8DJShKEPJSHCRp8bZ8Lp5oFkvQDhqbv7WRKlCoLUXiOeWUbWkihTpMX1CPe98P/E=
21+
- secure: hoTnU0bDEUaW3tDtihKPeAazr2P2KUH9h+BnTOY3hdk/GlwJVeKdnqvjKRhnXVlAUoBLWqbycrcrkT4mxnHChOMa7/ddQCDhQqJ3g1UuQAI6rg6MrCb547i2JaGUnmapD3FxFEBe9N4a4o6Clq8DRy6U0q4DsOjQZuGWRI92KLo=
22+
- secure: POqbBFN2b2cSUhrFi1A3x3GQKpyJsAaND7NpF1AuNYsx/piZ4Xs0NQkMEi2i4ceZ2uWFQyI2Z+32EN2Meho3ShwBgC0ZMzg1DoEfzR3zGF0xnK3/9PUDMC4X7XCDaDJYwXUo7oQFmBZFAfi8JpS4JNhBTpUk7ZHY0c+BZXLRVpo=
23+
- secure: dtxICswlTewVugT7ADNPnDqH/Y3Bf6yBhVwPs93tZ2fagdGJpuFG2Asi/PEszaOIfll1x+R7yxZef9LtTxGf+mm4fE341/ebklJpZQOezOFDSwtA9XRbBSHIa3iI6aIFXuHfw7njGIvHyCDc9ZkoLbGPF5kxUP6KPDIEA1RdM0U=

gradle/buildViaTravis.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# This script will build the project.
3+
4+
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
5+
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6+
./gradlew -Prelease.useLastTag=true build
7+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
8+
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
9+
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot --stacktrace
10+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
11+
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
12+
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
13+
else
14+
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
15+
./gradlew -Prelease.useLastTag=true build
16+
fi

0 commit comments

Comments
 (0)