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
@@ -11,7 +11,7 @@ It analyzes your commits to determine the appropriate version increment accordin
11
11
12
12
We will use `pyproject.toml` as the configuration file throughout the documentation.
13
13
14
-
See [Configuration file](../config.md#configuration-file) for more details.
14
+
See [Configuration file](../config/configuration_file.md) for more details.
15
15
16
16
## Key Features
17
17
@@ -30,7 +30,7 @@ The version follows the `MAJOR.MINOR.PATCH` format, with increments determined b
30
30
|`MINOR`| New features |`feat`|
31
31
|`PATCH`| Fixes and improvements |`fix`, `perf`, `refactor`|
32
32
33
-
### Version Schemes (`--version-scheme`)
33
+
### `--version-scheme`
34
34
35
35
By default, Commitizen uses [PEP 440][pep440] for version formatting. You can switch to semantic versioning using either:
36
36
@@ -50,7 +50,7 @@ Available options are:
50
50
-`pep440`: [PEP 440][pep440] (**default** and recommended for Python projects)
51
51
-`semver`: [Semantic Versioning][semver] (recommended for non-Python projects)
52
52
53
-
You can also set this in the [configuration](#version_scheme) with `version_scheme = "semver"`.
53
+
You can also set this in the configuration file with `version_scheme = "semver"`.
54
54
55
55
!!! note
56
56
[pep440][pep440] and [semver][semver] are quite similar, although their difference lies in
@@ -111,7 +111,7 @@ Commitizen supports the [PEP 440][pep440] version format, which includes several
111
111
112
112
### `--files-only`
113
113
114
-
Bumps the version in the files defined in [`version_files`](#version_files) without creating a commit and tag on the git repository.
114
+
Bumps the version in the files defined in [`version_files`][version_files] without creating a commit and tag on the git repository.
115
115
116
116
```bash
117
117
cz bump --files-only
@@ -178,7 +178,7 @@ The following table illustrates the difference in behavior between the two modes
178
178
179
179
### `--check-consistency`
180
180
181
-
Check whether the versions defined in [`version_files`](#version_files) and the version in Commitizen configuration are consistent before bumping version.
181
+
Check whether the versions defined in [version_files][version_files] and the version in Commitizen configuration are consistent before bumping version.
182
182
183
183
```bash
184
184
cz bump --check-consistency
@@ -207,7 +207,7 @@ from setuptools import setup
207
207
setup(..., version="1.0.5", ...)
208
208
```
209
209
210
-
When you run `cz bump --check-consistency`, Commitizen will verify that the current version in `pyproject.toml` (`1.21.0`) exists in all files listed in [`version_files`](#version_files).
210
+
When you run `cz bump --check-consistency`, Commitizen will verify that the current version in `pyproject.toml` (`1.21.0`) exists in all files listed in [version_files][version_files].
211
211
In this example, it will detect that `setup.py` contains `1.0.5` instead of `1.21.0`, causing the bump to fail.
212
212
213
213
!!! warning "Partial updates on failure"
@@ -260,6 +260,9 @@ For example, in `pyproject.toml`:
260
260
annotated_tag = true
261
261
```
262
262
263
+
!!! note
264
+
By default, Commitizen uses lightweight tags.
265
+
263
266
### `--annotated-tag-message`
264
267
265
268
Create annotated tags with the given message.
@@ -351,10 +354,13 @@ Creates gpg signed tags.
351
354
cz bump --gpg-sign
352
355
```
353
356
357
+
!!! note
358
+
By default, Commitizen uses lightweight tags.
359
+
354
360
### `--template`
355
361
356
362
Provides your own changelog jinja template.
357
-
See [the template customization section](../customization.md#customizing-the-changelog-template)
363
+
See [the template customization section](../customization/changelog_template.md)
358
364
359
365
### `--extra`
360
366
@@ -364,7 +370,7 @@ Provides your own changelog extra variables by using the `extras` settings or th
|`$devrelease`, `${devrelease}`| Development release |
503
507
504
-
### `version_files`
505
-
506
-
Identify the files or glob patterns which should be updated with the new version.
507
-
508
-
Commitizen will update its configuration file automatically when bumping,
509
-
regardless of whether the file is present or not in `version_files`.
510
-
511
-
You may specify the `version_files` in your configuration file.
512
-
513
-
```toml title="pyproject.toml"
514
-
[tool.commitizen]
515
-
version_files = [
516
-
"src/__version__.py",
517
-
]
518
-
```
519
-
520
-
It is also possible to provide a pattern for each file, separated by a colon (e.g. `file:pattern`). See the below example for more details.
521
-
522
-
```toml title="pyproject.toml"
523
-
[tool.commitizen]
524
-
version_files = [
525
-
"packages/*/pyproject.toml:version",
526
-
"setup.json:version",
527
-
]
528
-
```
529
-
530
-
#### Example scenario
531
-
532
-
We have a project with the following configuration file `pyproject.toml`:
533
-
534
-
```toml title="pyproject.toml"
535
-
[tool.commitizen]
536
-
version_files = [
537
-
"src/__version__.py",
538
-
"packages/*/pyproject.toml:version",
539
-
"setup.json:version",
540
-
]
541
-
```
542
-
543
-
For the reference `"setup.json:version"`, it means that it will look for a file `setup.json` and will only change the lines that contain the substring `"version"`.
544
-
545
-
For example, if the content of `setup.json` is:
546
-
547
-
<!-- DEPENDENCY: repeated_version_number.json -->
548
-
549
-
```json title="setup.json"
550
-
{
551
-
"name": "magictool",
552
-
"version": "1.2.3",
553
-
"dependencies": {
554
-
"lodash": "1.2.3"
555
-
}
556
-
}
557
-
```
558
-
559
-
After running `cz bump 2.0.0`, its content will be updated to:
560
-
561
-
```diff title="setup.json"
562
-
{
563
-
"name": "magictool",
564
-
- "version": "1.2.3",
565
-
+ "version": "2.0.0",
566
-
"dependencies": {
567
-
"lodash": "1.2.3"
568
-
}
569
-
}
570
-
```
571
-
572
-
!!! note
573
-
Files can be specified using relative (to the execution) paths, absolute paths, or glob patterns.
574
-
575
-
!!! note "Historical note"
576
-
This option was renamed from `files` to `version_files`.
577
-
578
-
### `bump_message`
579
-
580
-
Template used to specify the commit message generated when bumping.
581
-
582
-
Defaults to: `bump: version $current_version → $new_version`
0 commit comments