Skip to content

Commit 1a69e70

Browse files
committed
Updated build settings for Travis
1 parent 026f50d commit 1a69e70

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

travis-build.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
set -ev
3+
echo "current git hash:"
4+
git rev-parse --short HEAD
5+
6+
saveMavenSettings() {
7+
cat >$HOME/.m2/settings.xml <<EOL
8+
<?xml version='1.0' encoding='UTF-8'?>
9+
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
10+
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
11+
<servers>
12+
<server>
13+
<id>bintray</id>
14+
<username>${BINTRAY_USER}</username>
15+
<password>${BINTRAY_PASS}</password>
16+
</server>
17+
<server>
18+
<id>github</id>
19+
<username>${GITHUB_USER}</username>
20+
<password>${GITHUB_TOKEN}</password>
21+
</server>
22+
</servers>
23+
</settings>
24+
EOL
25+
}
26+
27+
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && [ "${RELEASE}" = "true" ]; then
28+
echo "Deploying release to Bintray"
29+
saveMavenSettings
30+
git checkout -f ${TRAVIS_BRANCH}
31+
./gradlew clean assemble && ./gradlew check --info && ./gradlew bintrayUpload -x check --info
32+
fi

0 commit comments

Comments
 (0)