Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.68 KB

CONTRIBUTING.md

File metadata and controls

62 lines (40 loc) · 2.68 KB

Contributing

General guidelines and code of conduct

This repository follows the same contribution guidelines and code of conduct as the main DAML repository.

Build and test

This project uses NPM to manage the dependencies and the environment of scripts handling the build lifecycle.

Before you start coding, install the dependencies:

npm install

Once this is done you can run the full build:

npm test

The full build consists of:

  1. downloading the Ledger API ProtoBuffer service definitions from Digital Asset's Bintray,
  2. generating the gRPC stubs,
  3. running the TypeScript compilation, and finally
  4. running the tests using Mocha.

Steps 1 and 2 are executed only if the proto and src/generated directories are not available locally.

To force these build phases to run again (e.g. because the bindings now depend on a new version of the gRPC Ledger API definitions), run the following before re-running npm test:

rm -rf proto src/generated

Release

Prerequisites

  • use Node.js version 8 or 10
  • be a part of the digitalasset organization on GitHub
  • npm login before npm publish

Process

The following steps are to be followed in order to release a new version of the bindings:

  1. Choose a new version number <version> (the 0.x release series does not uphold semantic versioning)
  2. Create the branch release-<version>
  3. Change the title of the unreleased section in the changelog to the chosen <version>
  4. Run the command npm version --no-git-tag-version <version>
  5. Commit the outstanding changes with the message Prepare release <version>
  6. Open a pull request with the title "Release <version>", have it reviewed, squashed and merged
  7. After the pull request has been squashed and merged, pull the master locally and check it out
  8. Tag the commit resulting from step 6 with the name v<version> (e.g. v0.8.2)
  9. Push the tag created in the previous step
  10. Publish with npm publish

To publish the documentation, start from where you left off and then:

  1. Create the documentation for the release with npm run release-docs
  2. Checkout the gh-pages branch
  3. Add the generated documentation to this branch (i.e. move them from the docs folder to the repository root)
  4. Update the latest symbolic link to point to the new docs
  5. Commit with the message <version> and push it