From 9fb2d6072a2dc04288548cb97d71784912dde76e Mon Sep 17 00:00:00 2001 From: Bilawal Hameed Date: Wed, 15 Jul 2020 12:02:12 +0200 Subject: [PATCH] docs(techdocs-cli): add docs on deploying / bumping up version --- packages/techdocs-cli/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/techdocs-cli/README.md b/packages/techdocs-cli/README.md index 960574db37..497101df78 100644 --- a/packages/techdocs-cli/README.md +++ b/packages/techdocs-cli/README.md @@ -45,3 +45,18 @@ npx techdocs serve You should have a `localhost:3000` serving TechDocs in Backstage, as well as `localhost:8000` serving Mkdocs (which won't open up and be exposed to the user). Happy hacking! + +## Deploying a new version + +Deploying the Node packages to NPM happens automatically on merge to `master` through GitHub Actions. The deployment happens through Lerna which determines which packages throughout the Backstage project have changed. In our case, the package is called `techdocs-cli` in the repository but `@techdocs/cli` in the NPM registry. + +> Note: Once a package is published under a version, any subsequent changes will not override that version. You will need to bump up the version across the entire Backstage repository, which can be done through Lerna (see the command below). + +In order to bump up all packages, go to the root of the Backstage repository. To see the current version see the `lerna.json` under the `version` key. To then update all the versions (locally on your machine), run the following: + +```bash +git checkout -b bump-up-version +yarn lerna version --no-push --allow-branch --yes +``` + +Upon being merged to master, Lerna will then automatically publish these packages as configured by the Backstage core team.