File tree Expand file tree Collapse file tree 3 files changed +39
-18
lines changed
Expand file tree Collapse file tree 3 files changed +39
-18
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,24 @@ before_install:
1212
1313script :
1414 - ./mvnw test -B
15- - .travis/deploy.sh
1615
16+ deploy :
17+ -
18+ provider : script
19+ script : .travis/deploy.sh
20+ skip_cleanup : true
21+ on :
22+ repo : ExpediaDotCom/graphql-kotlin
23+ branch : master
24+ jdk : oraclejdk8
25+ -
26+ provider : script
27+ script : .travis/deploy.sh
28+ skip_cleanup : true
29+ on :
30+ repo : ExpediaDotCom/graphql-kotlin
31+ tags : true
32+ jdk : oraclejdk8
1733
1834jdk : oraclejdk8
1935
Original file line number Diff line number Diff line change 1- #! /bin/bash -ex
2- cd ` dirname $0 ` /..
1+ #! /bin/bash -x
2+ cd ` dirname $0 ` /..
33
4- echo TRAVIS_BRANCH=$TRAVIS_BRANCH
5- echo TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
6- echo TRAVIS_TAG=$TRAVIS_TAG
7-
8- if [ " $TRAVIS_BRANCH " == ' master' ] || [ " $TRAVIS_PULL_REQUEST " == ' true' ] || [ -z " $TRAVIS_TAG " ]; then
9- echo " Skipping artifact deployment for a non-release build"
10- exit 0
4+ if [ -z " $SONATYPE_USERNAME " ]
5+ then
6+ echo " ERROR! Please set SONATYPE_USERNAME environment variable"
7+ exit 1
118fi
129
13- if [[ -z " $SONATYPE_USERNAME " || -z " $SONATYPE_PASSWORD " ]]; then
14- echo " ERROR! Please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
10+ if [ -z " $SONATYPE_PASSWORD " ]
11+ then
12+ echo " ERROR! Please set SONATYPE_PASSWORD environment variable"
1513 exit 1
1614fi
1715
18- echo " travis tag is set -> updating pom.xml <version> attribute to $TRAVIS_TAG "
19- ./mvnw --batch-mode release:update-versions -DdevelopmentVersion=$TRAVIS_TAG -SNAPSHOT
20- git checkout -b release-$TRAVIS_TAG
21- ./mvnw --batch-mode --settings .travis/settings.xml --no-snapshot-updates -Prelease -DpushChanges=false -DskipTests=true -DreleaseVersion=$TRAVIS_TAG -DcheckModificationExcludeList=pom.xml release:prepare
22- ./mvnw --batch-mode --settings .travis/settings.xml -Prelease clean deploy -DpushChanges=false -DskipTests=true -B -U
16+ if [ ! -z " $TRAVIS_TAG " ]
17+ then
18+ SKIP_GPG_SIGN=false
19+ echo " travis tag is set -> updating pom.xml <version> attribute to $TRAVIS_TAG "
20+ mvn --settings .travis/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG 1> /dev/null 2> /dev/null
21+ else
22+ SKIP_GPG_SIGN=true
23+ echo " no travis tag is set, hence keeping the snapshot version in pom.xml"
24+ fi
25+
26+ mvn clean deploy --settings .travis/settings.xml -Dgpg.skip=$SKIP_GPG_SIGN -DskipTests=true -B -U
27+
2328echo " successfully deployed the jars to nexus"
Original file line number Diff line number Diff line change 55
66 <groupId >com.expedia.www</groupId >
77 <artifactId >graphql-kotlin</artifactId >
8- <version >DEVELOPMENT </version >
8+ <version >0.0.17-SNAPSHOT </version >
99 <name >graphql-kotlin</name >
1010 <description >Code-only GraphQL schema generation for Kotlin</description >
1111 <url >https://github.com/ExpediaDotCom/graphql-kotlin</url >
You can’t perform that action at this time.
0 commit comments