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/config/version_provider.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Commitizen includes several built-in version providers for common package manage
19
19
The default version provider stores and retrieves the version from your Commitizen configuration file (e.g., `pyproject.toml`, `.cz.toml`, etc.).
20
20
21
21
**Use when:**
22
+
22
23
- You want to keep version management separate from your package manager
23
24
- Your project doesn't use a standard package manager
24
25
- You need maximum flexibility in version management
@@ -35,6 +36,7 @@ version = "0.1.0" # Required when using this provider
35
36
Fetches the version from Git tags using `git describe`. This provider **only reads** version information and never writes it back to files. It's designed to work with tools like `setuptools-scm` or other package manager `*-scm` plugins that derive version numbers from Git history.
36
37
37
38
**Use when:**
39
+
38
40
- You're using `setuptools-scm` or similar tools
39
41
- You want version numbers derived from Git tags
40
42
- You don't want Commitizen to modify any files for version management
@@ -54,6 +56,7 @@ version_provider = "scm"
54
56
Manages version in `pyproject.toml` under the `project.version` field, following [PEP 621](https://peps.python.org/pep-0621/) standards.
55
57
56
58
**Use when:**
59
+
57
60
- You're using a modern Python project with PEP 621-compliant `pyproject.toml`
58
61
- You want version management integrated with your Python project metadata
59
62
@@ -75,6 +78,7 @@ version = "0.1.0" # Managed by Commitizen
75
78
Manages version in `pyproject.toml` under the `tool.poetry.version` field, which is used by the [Poetry](https://python-poetry.org/) package manager. This approach is recommended only for users running Poetry versions earlier than 2.0 or relying on Poetry-specific features. For most users on Poetry 2.0 or later, it is recommended to use `pep621` instead. [Read More](https://python-poetry.org/docs/main/managing-dependencies/)
76
79
77
80
**Use when:**
81
+
78
82
- You're using Poetry < 2.0 as your Python package manager
79
83
- You're using Poetry >= 2.0 as your Python package manager, but don't need poetry-specific features
80
84
- You want Commitizen to manage the version that Poetry uses
@@ -101,6 +105,7 @@ Manages version in both `pyproject.toml` (`project.version`) and `uv.lock` (`pac
101
105
Even though uv follows PEP 621 format, `pep621` does not manage the version in `uv.lock`. `uv` is still suggested for uv users.
102
106
103
107
**Use when:**
108
+
104
109
- You're using `uv` as your Python package manager
105
110
- You want version synchronization between `pyproject.toml` and `uv.lock`
106
111
@@ -115,6 +120,7 @@ version_provider = "uv"
115
120
Manages version in both `Cargo.toml` (`package.version`) and `Cargo.lock` (`package.version` for the matching package name). This ensures consistency between your Rust project's manifest and lock file.
116
121
117
122
**Use when:**
123
+
118
124
- You're working with a Rust project using Cargo
119
125
- You want Commitizen to manage Rust package versions
120
126
@@ -136,6 +142,7 @@ version = "0.1.0" # Managed by Commitizen
136
142
Manages version in `package.json` and optionally synchronizes with `package-lock.json` and `npm-shrinkwrap.json` if they exist.
137
143
138
144
**Use when:**
145
+
139
146
- You're working with a Node.js/JavaScript project
140
147
- You want Commitizen to manage npm package versions
141
148
@@ -158,6 +165,7 @@ version_provider = "npm"
158
165
Manages version in `composer.json` under the `version` field, used by PHP's Composer package manager.
159
166
160
167
**Use when:**
168
+
161
169
- You're working with a PHP project using Composer
162
170
- You want Commitizen to manage Composer package versions
0 commit comments