Skip to content

Commit

Permalink
Fixed maven central sync step
Browse files Browse the repository at this point in the history
  • Loading branch information
padamstx committed Feb 21, 2019
1 parent c772c1e commit d1e9025
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ notifications:
env:
global:
- BINTRAY_REPO_OWNER=ibm-cloud-sdks
- BINTRAY_REPONAME=ibm-cloud-sdk-repo
- BINTRAY_PKGNAME=com.ibm.cloud:sdk-core
- BINTRAY_REPO_NAME=ibm-cloud-sdk-repo
- BINTRAY_PKG_NAME=com.ibm.cloud:sdk-core

branches:
except:
Expand Down Expand Up @@ -59,4 +59,4 @@ deploy:
# Ask bintray to sync the just-deployed artifact to maven central
after_script:
- '[ "${TRAVIS_TAG}" != "" ]
&& build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG'
&& build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPO_OWNER $BINTRAY_REPO_NAME $BINTRAY_PKG_NAME $TRAVIS_TAG'
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ If you want to contribute to the repository, here's a quick guide:
4. Commit your changes
5. Push to your fork and submit a pull request to the **master** branch

# Creating a release

To create a release from the most recent commit in the master branch, follow these steps:
1. In your local copy of the repo (a clone, not a fork), checkout the master branch:
```
git checkout master
```
2. Add the tag (this example creates the 1.2.0 tag):
```
git tag 1.2.0
```
Note: specify the appropriate three-level version # (1.2.0, 1.3.1, 2.0.0, etc.)
3. Push the tag to remote:
```
git push --tags
```
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.
# Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
Expand Down
4 changes: 2 additions & 2 deletions build/bintray-config.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"package": {
"vcs_url": "https://github.com/IBM/java-sdk-core.git",
"repo": "${BINTRAY_REPONAME}",
"repo": "${BINTRAY_REPO_NAME}",
"issue_tracker_url": "https://github.com/IBM/java-sdk-core/issues",
"subject": "${BINTRAY_REPO_OWNER}",
"website_url": "https://github.com/IBM/java-sdk-core",
"name": "${BINTRAY_PKGNAME}"
"name": "${BINTRAY_PKG_NAME}"
},

"version": {
Expand Down
15 changes: 8 additions & 7 deletions build/sync2MC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ if [ $# -lt 5 ]
then
echo "
Syntax:
$0 <bintray-user> <bintray-apikey> <bintray-reponame> <bintray-packagename> <bintray-packageversion>>
$0 <bintray-user> <bintray-apikey> <bintray-repo-owner> <bintray-reponame> <bintray-packagename> <bintray-packageversion>>
Example:
$0 user1 A1098765 my-bintray-repo1 my-bintray-package 0.0.1
$0 user1 A1098765 my-bintray-org my-bintray-repo1 my-bintray-package 0.0.1
"

exit 1
fi

subject=$1
user=$1
apikey=$2
reponame=$3
pkgname=$4
pkgversion=$5
subject=$3
reponame=$4
pkgname=$5
pkgversion=$6

#set -x

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

basicauth="${subject}:${apikey}"
basicauth="${user}:${apikey}"

echo "
Executing curl command..."
Expand Down

0 comments on commit d1e9025

Please sign in to comment.