Skip to content

Commit ed21541

Browse files
yajoLee-W
authored andcommitted
docs: document --retry
Includes an update to the `cz bump --help` output.
1 parent 12b56ad commit ed21541

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

docs/bump.md

+25-12
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,38 @@ Some examples:
5454

5555
```bash
5656
$ cz bump --help
57-
usage: cz bump [-h] [--dry-run] [--files-only] [--changelog] [--no-verify] [--local-version]
58-
[--yes] [--tag-format TAG_FORMAT] [--bump-message BUMP_MESSAGE]
59-
[--prerelease {alpha,beta,rc}]
60-
[--increment {MAJOR,MINOR,PATCH}] [--check-consistency] [--annotated-tag]
57+
usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog]
58+
[--no-verify] [--yes] [--tag-format TAG_FORMAT]
59+
[--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}]
60+
[--increment {MAJOR,MINOR,PATCH}] [--check-consistency]
61+
[--annotated-tag] [--changelog-to-stdout] [--retry]
6162

62-
optional arguments:
63+
options:
6364
-h, --help show this help message and exit
6465
--dry-run show output to stdout, no commit, no modified files
6566
--files-only bump version in the files from the config
67+
--local-version bump only the local version portion
6668
--changelog, -ch generate the changelog for the newest version
67-
--no-verify this option bypasses the pre-commit and commit-msg hooks
69+
--no-verify this option bypasses the pre-commit and commit-msg
70+
hooks
6871
--yes accept automatically questions done
69-
--local-version bump the local portion of the version
7072
--tag-format TAG_FORMAT
71-
the format used to tag the commit and read it, use it in existing projects, wrap
72-
around simple quotes
73+
the format used to tag the commit and read it, use it
74+
in existing projects, wrap around simple quotes
7375
--bump-message BUMP_MESSAGE
74-
template used to create the release commit, useful when working with CI
76+
template used to create the release commit, useful
77+
when working with CI
7578
--prerelease {alpha,beta,rc}, -pr {alpha,beta,rc}
7679
choose type of prerelease
7780
--increment {MAJOR,MINOR,PATCH}
7881
manually specify the desired increment
7982
--check-consistency, -cc
80-
check consistency among versions defined in commitizen configuration and
81-
version_files
83+
check consistency among versions defined in commitizen
84+
configuration and version_files
8285
--annotated-tag, -at create annotated tag instead of lightweight one
86+
--changelog-to-stdout
87+
Output changelog to the stdout
88+
--retry retry commit if it fails the 1st time
8389
```
8490
8591
### `--files-only`
@@ -179,6 +185,13 @@ Example:
179185
cz bump --changelog --changelog-to-stdout > body.md
180186
```
181187
188+
### `--retry`
189+
190+
If you use tools like [pre-commit](https://pre-commit.com/), add this flag.
191+
It will retry the commit if it fails the 1st time.
192+
193+
Useful to combine with code formatters, like [Prettier](https://prettier.io/).
194+
182195
## Avoid raising errors
183196
184197
Some situations from commitizen rise an exit code different than 0.

0 commit comments

Comments
 (0)