Skip to content

Commit 585c5b6

Browse files
committed
Fix bintray deployment step
1 parent 488fd72 commit 585c5b6

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

.travis.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ dist: trusty
44
jdk:
55
- oraclejdk8
66

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+
715
branches:
816
except:
917
- gh-pages
@@ -14,18 +22,18 @@ cache:
1422

1523
install: true
1624

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 #.
2426
before_script:
2527
- env
2628
- 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'
2937

3038
script:
3139
- mvn clean package
@@ -42,13 +50,12 @@ deploy:
4250
api_key: $GITHUB_OAUTH_TOKEN
4351
file_glob: true
4452
file:
45-
- target/sdk-core-*.jar
53+
- target/java-sdk-core-*.jar
4654
skip_cleanup: true
4755
on:
4856
tags: true
4957

58+
# Ask bintray to sync the just-deployed artifact to maven central
5059
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'

build/bintray-config.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"vcs_url": "https://github.com/IBM/java-sdk-core.git",
44
"repo": "${BINTRAY_REPONAME}",
55
"issue_tracker_url": "https://github.com/IBM/java-sdk-core/issues",
6-
"subject": "${BINTRAY_USER}",
6+
"subject": "padamstx",
77
"website_url": "https://github.com/IBM/java-sdk-core",
88
"name": "${BINTRAY_PKGNAME}"
99
},

0 commit comments

Comments
 (0)