File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22cd ` dirname $0 ` /..
33
4- if [ " $TRAVIS_BRANCH " != ' master' ] || [ " $TRAVIS_PULL_REQUEST " != ' false' ]; then
5- echo " Skipping artifact deployment for a non-release build"
6- exit 0
7- fi
8-
9- if [[ -z " $SONATYPE_USERNAME " || -z " $SONATYPE_PASSWORD " ]]; then
4+ if [ " ${TRAVIS_BRANCH} " == ' master' -a " ${TRAVIS_PULL_REQUEST} " == ' false' ] || [ -n " ${TRAVIS_TAG} " ]; then
5+ if [[ -z " ${SONATYPE_USERNAME} " || -z " ${SONATYPE_PASSWORD} " ]]; then
106 echo " ERROR! Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
117 exit 1
12- fi
8+ fi
139
14- if [ ! -z " $TRAVIS_TAG " ]; then
15- echo " travis tag is set -> updating pom.xml <version> attribute to $TRAVIS_TAG "
16- ./mvnw --batch-mode --settings .travis/settings.xml --no-snapshot-updates -Prelease -DskipTests=true -DreleaseVersion=$TRAVIS_TAG release:prepare
17- else
10+ if [ ! -z " ${ TRAVIS_TAG} " ]; then
11+ echo " travis tag is set -> updating pom.xml <version> attribute to ${ TRAVIS_TAG} "
12+ ./mvnw --batch-mode --settings .travis/settings.xml --no-snapshot-updates -Prelease -DskipTests=true -DreleaseVersion=${ TRAVIS_TAG} release:prepare
13+ else
1814 echo " no travis tag is set, hence keeping the snapshot version in pom.xml"
19- fi
15+ fi
2016
21- ./mvnw --batch-mode --settings .travis/settings.xml -Prelease clean deploy -DskipTests=true -B -U
22- SUCCESS=$?
23- if [ ${SUCCESS} -eq 0 ]; then
17+ ./mvnw --batch-mode --settings .travis/settings.xml -Prelease clean deploy -DskipTests=true -B -U
18+ SUCCESS=$?
19+ if [ ${SUCCESS} -eq 0 ]; then
2420 echo " successfully deployed the jars to nexus"
21+ fi
22+
23+ exit ${SUCCESS}
24+ else
25+ echo " Skipping artifact deployment for branch ${TRAVIS_BRANCH} with PR=${TRAVIS_PULL_REQUEST} and TAG=${TRAVIS_TAG} "
2526fi
2627
27- exit ${SUCCESS}
28+ exit 0
You can’t perform that action at this time.
0 commit comments