@@ -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
@@ -151,9 +151,9 @@ configuration are consistent before bumping version.
151
151
cz bump --check-consistency
152
152
```
153
153
154
- For example, if we have ` pyproject.toml `
154
+ For example, if we have
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,11 @@ version_files = [
162
162
]
163
163
```
164
164
165
- ` src/__version__.py ` ,
166
-
167
- ``` python
165
+ ``` python title="src/__version__.py"
168
166
__version__ = " 1.21.0"
169
167
```
170
168
171
- and ` setup.py ` .
172
-
173
- ``` python
169
+ ``` python title="setup.py"
174
170
from setuptools import setup
175
171
176
172
setup(... , version = " 1.0.5" , ... )
@@ -193,7 +189,7 @@ cz bump --local-version
193
189
194
190
For example, if we have ` pyproject.toml `
195
191
196
- ``` toml
192
+ ``` toml title="pyproject.toml"
197
193
[tool .commitizen ]
198
194
version = " 5.3.5+0.1.0"
199
195
```
@@ -454,7 +450,7 @@ In your `pyproject.toml` or `.cz.toml`
454
450
tag_format = " v$major.$minor.$patch$prerelease"
455
451
```
456
452
457
- The variables must be preceded by a ` $ ` sign and optionally can be wrapped in ` {} ` . Default is ` $version ` .
453
+ The variables must be preceded by a ` $ ` sign and optionally can be wrapped in ` {} ` . The default is ` $version ` .
458
454
459
455
Supported variables:
460
456
@@ -483,7 +479,7 @@ Some examples
483
479
484
480
` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
485
481
486
- ``` toml
482
+ ``` toml title="pyproject.toml"
487
483
[tool .commitizen ]
488
484
version_files = [
489
485
" src/__version__.py" ,
@@ -496,8 +492,7 @@ This means that it will find a file `setup.py` and will only make a change
496
492
in a line containing the ` version ` substring.
497
493
498
494
!!! note
499
- Files can be specified using relative (to the execution) paths, absolute paths
500
- or glob patterns.
495
+ Files can be specified using relative (to the execution) paths, absolute paths, or glob patterns.
501
496
502
497
---
503
498
@@ -516,7 +511,7 @@ Some examples
516
511
517
512
` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
518
513
519
- ``` toml
514
+ ``` toml title="pyproject.toml"
520
515
[tool .commitizen ]
521
516
bump_message = " release $current_version → $new_version [skip-ci]"
522
517
```
@@ -529,7 +524,7 @@ When set to `true` the changelog is always updated incrementally when running `c
529
524
530
525
Defaults to: ` false `
531
526
532
- ``` toml
527
+ ``` toml title="pyproject.toml"
533
528
[tool .commitizen ]
534
529
update_changelog_on_bump = true
535
530
```
@@ -540,7 +535,7 @@ update_changelog_on_bump = true
540
535
541
536
When set to ` true ` , Commitizen will create annotated tags.
542
537
543
- ``` toml
538
+ ``` toml title="pyproject.toml"
544
539
[tool .commitizen ]
545
540
annotated_tag = true
546
541
```
@@ -551,7 +546,7 @@ annotated_tag = true
551
546
552
547
When set to ` true ` , Commitizen will create gpg signed tags.
553
548
554
- ``` toml
549
+ ``` toml title="pyproject.toml"
555
550
[tool .commitizen ]
556
551
gpg_sign = true
557
552
```
@@ -565,7 +560,7 @@ Useful during the initial development stage of your project.
565
560
566
561
Defaults to: ` false `
567
562
568
- ``` toml
563
+ ``` toml title="pyproject.toml"
569
564
[tool .commitizen ]
570
565
major_version_zero = true
571
566
```
@@ -591,7 +586,7 @@ execution of the script, some environment variables are available:
591
586
| ` CZ_PRE_INCREMENT ` | Whether this is a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
592
587
| ` CZ_PRE_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
593
588
594
- ``` toml
589
+ ``` toml title="pyproject.toml"
595
590
[tool .commitizen ]
596
591
pre_bump_hooks = [
597
592
" scripts/generate_documentation.sh"
@@ -618,7 +613,7 @@ release. During execution of the script, some environment variables are availabl
618
613
| ` CZ_POST_INCREMENT ` | Whether this was a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
619
614
| ` CZ_POST_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
620
615
621
- ``` toml
616
+ ``` toml title="pyproject.toml"
622
617
[tool .commitizen ]
623
618
post_bump_hooks = [
624
619
" scripts/slack_notification.sh"
@@ -631,7 +626,7 @@ Offset with which to start counting prereleases.
631
626
632
627
Defaults to: ` 0 `
633
628
634
- ``` toml
629
+ ``` toml title="pyproject.toml"
635
630
[tool .commitizen ]
636
631
prerelease_offset = 1
637
632
```
@@ -651,7 +646,7 @@ Options: `pep440`, `semver`, `semver2`
651
646
652
647
Defaults to: ` pep440 `
653
648
654
- ``` toml
649
+ ``` toml title="pyproject.toml"
655
650
[tool .commitizen ]
656
651
version_scheme = " semver"
657
652
```
0 commit comments