File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments