@@ -4,6 +4,14 @@ dist: trusty
4
4
jdk :
5
5
- oraclejdk8
6
6
7
+ notifications :
8
+ email : true
9
+
10
+ env :
11
+ global :
12
+ - BINTRAY_REPONAME=ibm-cloud-sdk-repo
13
+ - BINTRAY_PKGNAME=com.ibm.cloud:sdk-core
14
+
7
15
branches :
8
16
except :
9
17
- gh-pages
@@ -14,18 +22,18 @@ cache:
14
22
15
23
install : true
16
24
17
- env :
18
- global :
19
- - BINTRAY_REPO=ibm-cloud-sdk-repo
20
- - BINTRAY_PKGNAME=com.ibm.cloud:sdk-core
21
-
22
- # For a tagged build, we'll set the maven artifact version #
23
- # and resolve the variable references in the bintray config.
25
+ # For a tagged build, we'll set the maven artifact version #.
24
26
before_script :
25
27
- env
26
28
- echo "TRAVIS_TAG = '${TRAVIS_TAG}'"
27
- - ' [ "${TRAVIS_TAG}" != "" ] && mvn versions:set -DnewVersion=${TRAVIS_TAG} -DgenerateBackupPoms=false || true'
28
- - cat build/bintray-config.template | envsubst >bintray-config.json
29
+ - ' [ "${TRAVIS_TAG}" != "" ]
30
+ && mvn versions:set -DnewVersion=${TRAVIS_TAG} -DgenerateBackupPoms=false
31
+ || true'
32
+ - ' [ "${TRAVIS_TAG}" != "" ]
33
+ && cat build/bintray-config.template | envsubst >bintray-config.json
34
+ && echo "Contents of bintray-config.json:"
35
+ && cat bintray-config.json
36
+ || true'
29
37
30
38
script :
31
39
- mvn clean package
@@ -42,13 +50,12 @@ deploy:
42
50
api_key : $GITHUB_OAUTH_TOKEN
43
51
file_glob : true
44
52
file :
45
- - target/sdk-core-*.jar
53
+ - target/java- sdk-core-*.jar
46
54
skip_cleanup : true
47
55
on :
48
56
tags : true
49
57
58
+ # Ask bintray to sync the just-deployed artifact to maven central
50
59
after_script :
51
- - build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG
52
-
53
- notifications :
54
- email : true
60
+ - ' [ "${TRAVIS_TAG}" != "" ]
61
+ && build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG'
0 commit comments