diff --git a/.travis.yml b/.travis.yml index b93fa1efc..c0e189c4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08230b5ce..3b7a728ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: diff --git a/build/bintray-config.template b/build/bintray-config.template index 26b941d3f..def1c799c 100644 --- a/build/bintray-config.template +++ b/build/bintray-config.template @@ -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": { diff --git a/build/sync2MC.sh b/build/sync2MC.sh index e6e19e12a..695bf7294 100755 --- a/build/sync2MC.sh +++ b/build/sync2MC.sh @@ -4,25 +4,26 @@ if [ $# -lt 5 ] then echo " Syntax: - $0 > + $0 > 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..."