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/commands/bump.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,19 @@ You can also set this in the configuration file with `version_scheme = "semver"`
65
65
| Devrelease | `0.1.1.dev1` | `0.1.1-dev1` |
66
66
| Dev and pre | `1.0.0a3.dev1` | `1.0.0-a3-dev1` |
67
67
68
+
69
+
!!! note "Incomplete Version Handling"
70
+
Commitizen treats a three-part version (major.minor.patch) as complete.
71
+
If your configured version is incomplete (for example, `1` or `1.2`), Commitizen pads missing parts with zeros when it needs `major/minor/patch` for tag formatting.
72
+
The tag output depends on your `tag_format`: formats using `${version}` keep `1`/`1.2`, while formats using `${major}.${minor}.${patch}` will render `1.0.0`/`1.2.0`.
73
+
74
+
When bumping from an incomplete version, Commitizen looks for the latest existing tag that matches the provided release prefix.
75
+
For example, if the current version is `1.2` and the latest `1.2.x` tag is `1.2.3`, then a patch bump yields `1.2.4` and a minor bump yields `1.3.0`.
76
+
77
+
!!! tip
78
+
To control the behaviour of bumping and version parsing, you may implement your own `version_scheme` by inheriting from `commitizen.version_schemes.BaseVersion` or use an existing plugin package.
79
+
80
+
68
81
### PEP440 Version Examples
69
82
70
83
Commitizen supports the [PEP 440][pep440] version format, which includes several version types. Here are examples of each:
0 commit comments