Skip to content

Commit 4d78aa6

Browse files
committed
Add step to sync bintray package to maven central
1 parent 221a39c commit 4d78aa6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@ deploy:
4545
on:
4646
tags: true
4747

48+
after_deploy:
49+
- build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY sdk-maven-repo com.ibm.cloud.sdk:java-sdk-core $TRAVIS_TAG
50+
4851
notifications:
4952
email: true

build/sync2MC.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
if [ $# -lt 5 ]
4+
then
5+
echo "
6+
Syntax:
7+
$0 <bintray-user> <bintray-apikey> <bintray-reponame> <bintray-packagename> <bintray-packageversion>>
8+
Example:
9+
$0 user1 A1098765 my-bintray-repo1 my-bintray-package 0.0.1
10+
"
11+
12+
exit 1
13+
fi
14+
15+
subject=$1
16+
apikey=$2
17+
reponame=$3
18+
pkgname=$4
19+
pkgversion=$5
20+
21+
#set -x
22+
23+
urlstring="https://api.bintray.com/maven_central_sync/${subject}/${reponame}/${pkgname}/versions/${pkgversion}"
24+
25+
basicauth="${subject}:${apikey}"
26+
27+
echo "
28+
Executing curl command..."
29+
curl -X POST --data '{ "close": "1" }' -H "Content-Type: application/json" -L -k --user ${basicauth} ${urlstring}

0 commit comments

Comments
 (0)