@@ -31,7 +31,7 @@ cz bump --version-scheme semver
31
31
```
32
32
33
33
2 . Configuration file:
34
- ``` toml
34
+ ``` toml title="pyproject.toml"
35
35
[tool .commitizen ]
36
36
version_scheme = " semver"
37
37
```
@@ -113,7 +113,7 @@ Note that as per [semantic versioning spec](https://semver.org/#spec-item-9)
113
113
For example, the following versions (using the [ PEP 440] ( https://peps.python.org/pep-0440/ ) scheme) are ordered
114
114
by their precedence and showcase how a release might flow through a development cycle:
115
115
116
- - ` 1.0.0 ` is the current published version
116
+ - ` 1.0.0 ` is the currently published version
117
117
- ` 1.0.1a0 ` after committing a ` fix: ` for pre-release
118
118
- ` 1.1.0a1 ` after committing an additional ` feat: ` for pre-release
119
119
- ` 1.1.0b0 ` after bumping a beta release
@@ -153,7 +153,7 @@ cz bump --check-consistency
153
153
154
154
For example, if we have ` pyproject.toml `
155
155
156
- ``` toml
156
+ ``` toml title="pyproject.toml"
157
157
[tool .commitizen ]
158
158
version = " 1.21.0"
159
159
version_files = [
@@ -162,15 +162,16 @@ version_files = [
162
162
]
163
163
```
164
164
165
- ` src/__version__.py ` ,
165
+ ` src/__version__.py `
166
166
167
- ``` python
167
+
168
+ ``` python title="src/__version__.py"
168
169
__version__ = " 1.21.0"
169
170
```
170
171
171
- and ` setup.py ` .
172
+ and ` setup.py `
172
173
173
- ``` python
174
+ ``` python title="setup.py"
174
175
from setuptools import setup
175
176
176
177
setup(... , version = " 1.0.5" , ... )
@@ -193,7 +194,7 @@ cz bump --local-version
193
194
194
195
For example, if we have ` pyproject.toml `
195
196
196
- ``` toml
197
+ ``` toml title="pyproject.toml"
197
198
[tool .commitizen ]
198
199
version = " 5.3.5+0.1.0"
199
200
```
@@ -454,7 +455,7 @@ In your `pyproject.toml` or `.cz.toml`
454
455
tag_format = " v$major.$minor.$patch$prerelease"
455
456
```
456
457
457
- The variables must be preceded by a ` $ ` sign and optionally can be wrapped in ` {} ` . Default is ` $version ` .
458
+ The variables must be preceded by a ` $ ` sign and optionally can be wrapped in ` {} ` . The default is ` $version ` .
458
459
459
460
Supported variables:
460
461
@@ -483,7 +484,7 @@ Some examples
483
484
484
485
` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
485
486
486
- ``` toml
487
+ ``` toml title="pyproject.toml"
487
488
[tool .commitizen ]
488
489
version_files = [
489
490
" src/__version__.py" ,
@@ -496,8 +497,7 @@ This means that it will find a file `setup.py` and will only make a change
496
497
in a line containing the ` version ` substring.
497
498
498
499
!!! note
499
- Files can be specified using relative (to the execution) paths, absolute paths
500
- or glob patterns.
500
+ Files can be specified using relative (to the execution) paths, absolute paths, or glob patterns.
501
501
502
502
---
503
503
@@ -516,7 +516,7 @@ Some examples
516
516
517
517
` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
518
518
519
- ``` toml
519
+ ``` toml title="pyproject.toml"
520
520
[tool .commitizen ]
521
521
bump_message = " release $current_version → $new_version [skip-ci]"
522
522
```
@@ -529,7 +529,7 @@ When set to `true` the changelog is always updated incrementally when running `c
529
529
530
530
Defaults to: ` false `
531
531
532
- ``` toml
532
+ ``` toml title="pyproject.toml"
533
533
[tool .commitizen ]
534
534
update_changelog_on_bump = true
535
535
```
@@ -540,7 +540,7 @@ update_changelog_on_bump = true
540
540
541
541
When set to ` true ` , Commitizen will create annotated tags.
542
542
543
- ``` toml
543
+ ``` toml title="pyproject.toml"
544
544
[tool .commitizen ]
545
545
annotated_tag = true
546
546
```
@@ -551,7 +551,7 @@ annotated_tag = true
551
551
552
552
When set to ` true ` , Commitizen will create gpg signed tags.
553
553
554
- ``` toml
554
+ ``` toml title="pyproject.toml"
555
555
[tool .commitizen ]
556
556
gpg_sign = true
557
557
```
@@ -565,7 +565,7 @@ Useful during the initial development stage of your project.
565
565
566
566
Defaults to: ` false `
567
567
568
- ``` toml
568
+ ``` toml title="pyproject.toml"
569
569
[tool .commitizen ]
570
570
major_version_zero = true
571
571
```
@@ -591,7 +591,7 @@ execution of the script, some environment variables are available:
591
591
| ` CZ_PRE_INCREMENT ` | Whether this is a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
592
592
| ` CZ_PRE_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
593
593
594
- ``` toml
594
+ ``` toml title="pyproject.toml"
595
595
[tool .commitizen ]
596
596
pre_bump_hooks = [
597
597
" scripts/generate_documentation.sh"
@@ -618,7 +618,7 @@ release. During execution of the script, some environment variables are availabl
618
618
| ` CZ_POST_INCREMENT ` | Whether this was a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
619
619
| ` CZ_POST_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
620
620
621
- ``` toml
621
+ ``` toml title="pyproject.toml"
622
622
[tool .commitizen ]
623
623
post_bump_hooks = [
624
624
" scripts/slack_notification.sh"
@@ -631,7 +631,7 @@ Offset with which to start counting prereleases.
631
631
632
632
Defaults to: ` 0 `
633
633
634
- ``` toml
634
+ ``` toml title="pyproject.toml"
635
635
[tool .commitizen ]
636
636
prerelease_offset = 1
637
637
```
@@ -651,7 +651,7 @@ Options: `pep440`, `semver`, `semver2`
651
651
652
652
Defaults to: ` pep440 `
653
653
654
- ``` toml
654
+ ``` toml title="pyproject.toml"
655
655
[tool .commitizen ]
656
656
version_scheme = " semver"
657
657
```
0 commit comments