Skip to content

Commit d1e9025

Browse files
committed
Fixed maven central sync step
1 parent c772c1e commit d1e9025

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ notifications:
1010
env:
1111
global:
1212
- BINTRAY_REPO_OWNER=ibm-cloud-sdks
13-
- BINTRAY_REPONAME=ibm-cloud-sdk-repo
14-
- BINTRAY_PKGNAME=com.ibm.cloud:sdk-core
13+
- BINTRAY_REPO_NAME=ibm-cloud-sdk-repo
14+
- BINTRAY_PKG_NAME=com.ibm.cloud:sdk-core
1515

1616
branches:
1717
except:
@@ -59,4 +59,4 @@ deploy:
5959
# Ask bintray to sync the just-deployed artifact to maven central
6060
after_script:
6161
- '[ "${TRAVIS_TAG}" != "" ]
62-
&& build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG'
62+
&& build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPO_OWNER $BINTRAY_REPO_NAME $BINTRAY_PKG_NAME $TRAVIS_TAG'

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ If you want to contribute to the repository, here's a quick guide:
1414
4. Commit your changes
1515
5. Push to your fork and submit a pull request to the **master** branch
1616

17+
# Creating a release
18+
19+
To create a release from the most recent commit in the master branch, follow these steps:
20+
1. In your local copy of the repo (a clone, not a fork), checkout the master branch:
21+
```
22+
git checkout master
23+
```
24+
2. Add the tag (this example creates the 1.2.0 tag):
25+
```
26+
git tag 1.2.0
27+
```
28+
Note: specify the appropriate three-level version # (1.2.0, 1.3.1, 2.0.0, etc.)
29+
3. Push the tag to remote:
30+
```
31+
git push --tags
32+
```
33+
This will trigger a tagged build in Travis, which will perform the deployment steps to deploy the build outputs to bintray (and maven central) and the github project's `Releases` page.
34+
35+
1736
# Developer's Certificate of Origin 1.1
1837
1938
By making a contribution to this project, I certify that:

build/bintray-config.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"package": {
33
"vcs_url": "https://github.com/IBM/java-sdk-core.git",
4-
"repo": "${BINTRAY_REPONAME}",
4+
"repo": "${BINTRAY_REPO_NAME}",
55
"issue_tracker_url": "https://github.com/IBM/java-sdk-core/issues",
66
"subject": "${BINTRAY_REPO_OWNER}",
77
"website_url": "https://github.com/IBM/java-sdk-core",
8-
"name": "${BINTRAY_PKGNAME}"
8+
"name": "${BINTRAY_PKG_NAME}"
99
},
1010

1111
"version": {

build/sync2MC.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@ if [ $# -lt 5 ]
44
then
55
echo "
66
Syntax:
7-
$0 <bintray-user> <bintray-apikey> <bintray-reponame> <bintray-packagename> <bintray-packageversion>>
7+
$0 <bintray-user> <bintray-apikey> <bintray-repo-owner> <bintray-reponame> <bintray-packagename> <bintray-packageversion>>
88
Example:
9-
$0 user1 A1098765 my-bintray-repo1 my-bintray-package 0.0.1
9+
$0 user1 A1098765 my-bintray-org my-bintray-repo1 my-bintray-package 0.0.1
1010
"
1111

1212
exit 1
1313
fi
1414

15-
subject=$1
15+
user=$1
1616
apikey=$2
17-
reponame=$3
18-
pkgname=$4
19-
pkgversion=$5
17+
subject=$3
18+
reponame=$4
19+
pkgname=$5
20+
pkgversion=$6
2021

2122
#set -x
2223

2324
urlstring="https://api.bintray.com/maven_central_sync/${subject}/${reponame}/${pkgname}/versions/${pkgversion}"
2425

25-
basicauth="${subject}:${apikey}"
26+
basicauth="${user}:${apikey}"
2627

2728
echo "
2829
Executing curl command..."

0 commit comments

Comments
 (0)