From 8c98a6aabaa34be06543e5062f355910642289b4 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Thu, 23 Jul 2020 16:46:08 +0100 Subject: [PATCH] [FABCN-422] Add release guide Signed-off-by: James Taylor --- README.md | 18 ++++++------------ RELEASING.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 RELEASING.md diff --git a/README.md b/README.md index bb7ba754..57eda8db 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ This is the project to support the writing of Contracts with the node.js runtime. -As a contributor looking to update this repo, please start with the [contributing guide](CONTRIBUTING.md) - ## Documentation As an application developer, to learn about how to implement **"Smart Contracts"** for Hyperledger Fabric using Node.js, please visit the [API documentation](https://hyperledger.github.io/fabric-chaincode-node/) and follow the tutorial links. @@ -20,16 +18,6 @@ As an application developer, to learn about how to implement **"Smart Contracts" - [Samples repository](https://github.com/hyperledger/fabric-samples) - [Quick-start tutorial](TUTORIAL.md) -## Artifacts published from this repo - -- npm modules - - [fabric-contract-api](https://www.npmjs.com/package/fabric-contract-api) - - [fabric-shim](https://www.npmjs.com/package/fabric-shim) - - [fabric-shim-api](https://www.npmjs.com/package/fabric-shim-api) - - [fabric-shim-crypto](https://www.npmjs.com/package/fabric-shim-crypto) -- docker images - - [fabric-nodeenv](https://hub.docker.com/r/hyperledger/fabric-nodeenv) - ## Compatibility For details on what Nodejs runtime and versions of Hyperledger Fabric can be used please see the [compatibility document](COMPATIBILITY.md). @@ -40,6 +28,12 @@ In line with the advice from [npm on shrinkwrap](https://docs.npmjs.com/files/sh It is **STRONGLY** recommended therefore that after testing, and before putting your contract into production a `npm-shrinkwrap.json` file is created. When the chaincode is install it will be via a `npm install --production` command. +## Contributing + +If you are interested in contributing updates to this project, please start with the [contributing guide](CONTRIBUTING.md). + +There is also a [release guide](RELEASING.md) describing the process for publishing new versions. + --- ## License diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 00000000..23faff67 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,45 @@ +# Releasing + +The following artifacts are created as a result of releasing Fabric Chaincode Node: + +- docker images + - [fabric-nodeenv](https://hub.docker.com/r/hyperledger/fabric-nodeenv) +- npm modules + - [fabric-contract-api](https://www.npmjs.com/package/fabric-contract-api) + - [fabric-shim](https://www.npmjs.com/package/fabric-shim) + - [fabric-shim-api](https://www.npmjs.com/package/fabric-shim-api) + - [fabric-shim-crypto](https://www.npmjs.com/package/fabric-shim-crypto) + +**Note:** A docker image with a matching V.R version is required before releasing a new version of Fabric. + +## Before releasing + +It's useful to create an issue to keep track of each release, for example [FABCN-377 Release v2.0.0 chaincode-node](https://jira.hyperledger.org/browse/FABCN-377). + +The following tasks are required before releasing: + +- Update version numbers in package.json files to the required version +- Update `tag` in package.json files to the required value, e.g. `beta`, or `latest` +- Update test, sample, and docs files to match the new version +- Create a new release notes file +- Update the `CHANGELOG.md` file + + The `changelog.sh` script in `tools/scripts` will prepopulate the changelog but you must check and edit the file manually afterwards as required + +See the [Prepare 2.1.4 release](https://github.com/hyperledger/fabric-chaincode-node/pull/174) pull request for an example, although be careful to search for all versions in the codebase as they're easy to miss and things change! + +## Create release + +Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-chaincode-node/releases) will trigger the build to publish the new release. + +When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `v2.1.4` + +See previous releases for examples of the title and description. + +## After releasing + +- Update version numbers in package.json files to the next version appended with a `-unstable` pre-release label. e.g. `1.2.3-unstable` +- Update `tag` in package.json files to `unstable` +- Update test, sample, and docs files to match the new version + +See the [Bump version to 2.1.5](https://github.com/hyperledger/fabric-chaincode-node/pull/175) pull request for an example. It should include almost all the files changed to prepare for the release, except for the release notes and changelog which do not need updating.