Skip to content

Commit b157389

Browse files
committed
docs(contributing): reminders about git tags when publishing
1 parent 269a824 commit b157389

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,21 @@ We use [commitlint conventional configuration](https://github.com/conventional-c
5959

6060
This repo uses [Lerna](https://lerna.js.org) to manage the [versioning](https://github.com/lerna/lerna/tree/main/libs/commands/version/README.md) and [publishing](https://github.com/lerna/lerna/blob/main/libs/commands/publish/README.md) of all packages.
6161

62-
If you need to publish new patch versions of all modules that have changed since the last publish (e.g. after regenerating all modules with a newer version of Babel), run `lerna version patch --no-push --no-commit-hooks`. This creates a local "Publish" commit, containing all of the updated `package.json` and `package.json.lock` files.
62+
If you need to publish new patch versions of any modules that have changed (directly or indirectly) since the last publish, run the version command with the following options:
6363

64-
If things look good, run `lerna publish from-git`. All packages identified in the commit will be published to NPM.
64+
```shell
65+
lerna version patch --no-push --no-commit-hooks -m "chore(release): publish"
66+
```
67+
68+
This creates a local "publish" commit, containing all of the updated `package.json` and `package.json.lock` files. If you see any _unexpected_ updates, it could be that you have not pulled the latest git tags from the remote. Try the lerna [changed](https://github.com/lerna/lerna/tree/main/libs/commands/changed#readme) command to troubleshoot the issue.
69+
70+
If things look good, publish all packages to NPM with the publish command:
71+
72+
```shell
73+
lerna publish from-git
74+
```
6575

66-
Don't forget to push your local commit up to the git remote!
76+
**IMPORTANT:** Don't forget to push your "publish" commit and the new git tag(s) to the remote!
6777

6878
## Core Modules Style Guide
6979

0 commit comments

Comments
 (0)