You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bump.md
+20-17
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,12 @@ options:
79
79
specify non-negative integer for dev. release
80
80
--increment {MAJOR,MINOR,PATCH}
81
81
manually specify the desired increment
82
-
--exact-increment apply the exact changes that have been specified (or determined from the commit log), disabling logic that guesses the next version based on typical version progression when a prelease suffix is present.
82
+
--increment-mode
83
+
set the method by which the new version is chosen. 'linear' (default) guesses the next version based
84
+
on typical linear version progression, such that bumping of a pre-release with lower precedence than
85
+
the current pre-release phase maintains the current phase of higher precedence. 'exact' applies the
86
+
changes that have been specified (or determined from the commit log) without interpretation, such that
87
+
the increment and pre-release are always honored
83
88
--check-consistency, -cc
84
89
check consistency among versions defined in commitizen configuration and version_files
85
90
--annotated-tag, -at create annotated tag instead of lightweight one
@@ -140,29 +145,27 @@ by their precedence and showcase how a release might flow through a development
140
145
- `1.1.0rc0` after bumping the release candidate
141
146
- `1.1.0` next feature release
142
147
143
-
Also note that bumping pre-releases _maintains linearity_: bumping of a pre-release with lower precedence than
144
-
the current pre-release phase maintains the current phase of higher precedence. For example, if the current
145
-
version is `1.0.0b1`then bumping with `--prerelease alpha` will continue to bump the “beta” phase.
146
-
This behavior can be overridden by passing `--exact-increment` (see below).
148
+
### `--increment-mode`
147
149
148
-
### `--exact-increment`
150
+
By default, `--increment-mode` is set to `linear`, which ensures taht bumping pre-releases _maintains linearity_:
151
+
bumping of a pre-release with lower precedence than the current pre-release phase maintains the current phase of
152
+
higher precedence. For example, if the current version is `1.0.0b1`then bumping with `--prerelease alpha` will
153
+
continue to bump the “beta” phase.
149
154
150
-
The `--exact-increment` flag bypasses the logic that creates a best guess for the next version based on the
151
-
principle of maintaining linearity when a pre-release is present (see above). Instead, `bump` will apply the
155
+
Setting `--increment-mode` to `exact` instructs `cz bump` to instead apply the
152
156
exact changes that have been specified with `--increment` or determined from the commit log. For example,
153
157
`--prerelease beta` will always result in a `b` tag, and `--increment PATCH` will always increase the patch component.
154
158
155
159
Below are some examples that illustrate the difference in behavior:
156
160
157
-
158
-
| Increment | Pre-release | Start Version | Without `--exact-increment`| With `--exact-increment`|
0 commit comments