Skip to content

Commit 56a7664

Browse files
committed
chore: Update release script
- Allow users to preview the new release version and abort the release if necessary.
1 parent c27d8cf commit 56a7664

File tree

4 files changed

+457
-2
lines changed

4 files changed

+457
-2
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ When making a change that requires a new version to be published, you'll want to
3737
$ npm run release
3838
```
3939

40-
This will:
40+
After running this command, you'll get a preview of what the next tagged version would be. If you proceed, the release script will:
41+
4142
- Use all commit messages since the latest version tag to determine the correct new version
4243
- Increment the version in package.json and package-lock.json
4344
- Create a tagged commit with the new version
@@ -47,6 +48,27 @@ After your branch is merged, CI will take care of publishing to the npm registry
4748

4849
ℹ️ See the [Standard Version][standard cli] documentation for details on how to control versioning behavior.
4950

51+
### Specifying a release type
52+
Sometimes, you'll want manual control over the next version of the package. In these case, you can use the special `--major`, `--minor`, and `--patch` flags.
53+
54+
Major Release
55+
56+
```sh
57+
npm run release -- --major
58+
```
59+
60+
Minor Release
61+
62+
```sh
63+
npm run release -- --minor
64+
```
65+
66+
Patch Release
67+
68+
```sh
69+
npm run release -- --patch
70+
```
71+
5072
[pr]: https://github.com/sparkbox/safe-focus/compare
5173
[contributors]: https://github.com/sparkbox/safe-focus/graphs/contributors
5274
[Conventional Commits]: https://www.conventionalcommits.org/en/v1.0.0/

0 commit comments

Comments
 (0)