@@ -31,7 +31,7 @@ cz bump --version-scheme semver
3131```
3232
33332 . Configuration file:
34- ``` toml
34+ ``` toml title="pyproject.toml"
3535[tool .commitizen ]
3636version_scheme = " semver"
3737```
@@ -113,7 +113,7 @@ Note that as per [semantic versioning spec](https://semver.org/#spec-item-9)
113113For example, the following versions (using the [ PEP 440] ( https://peps.python.org/pep-0440/ ) scheme) are ordered
114114by their precedence and showcase how a release might flow through a development cycle:
115115
116- - ` 1.0.0 ` is the current published version
116+ - ` 1.0.0 ` is the currently published version
117117- ` 1.0.1a0 ` after committing a ` fix: ` for pre-release
118118- ` 1.1.0a1 ` after committing an additional ` feat: ` for pre-release
119119- ` 1.1.0b0 ` after bumping a beta release
@@ -153,7 +153,7 @@ cz bump --check-consistency
153153
154154For example, if we have ` pyproject.toml `
155155
156- ``` toml
156+ ``` toml title="pyproject.toml"
157157[tool .commitizen ]
158158version = " 1.21.0"
159159version_files = [
@@ -162,15 +162,16 @@ version_files = [
162162]
163163```
164164
165- ` src/__version__.py ` ,
165+ ` src/__version__.py `
166166
167- ``` python
167+
168+ ``` python title="src/__version__.py"
168169__version__ = " 1.21.0"
169170```
170171
171- and ` setup.py ` .
172+ and ` setup.py `
172173
173- ``` python
174+ ``` python title="setup.py"
174175from setuptools import setup
175176
176177setup(... , version = " 1.0.5" , ... )
@@ -193,7 +194,7 @@ cz bump --local-version
193194
194195For example, if we have ` pyproject.toml `
195196
196- ``` toml
197+ ``` toml title="pyproject.toml"
197198[tool .commitizen ]
198199version = " 5.3.5+0.1.0"
199200```
@@ -454,7 +455,7 @@ In your `pyproject.toml` or `.cz.toml`
454455tag_format = " v$major.$minor.$patch$prerelease"
455456```
456457
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 ` .
458459
459460Supported variables:
460461
@@ -471,7 +472,7 @@ Supported variables:
471472
472473### ` version_files ` \*
473474
474- It is used to identify the files which should be updated with the new version.
475+ It is used to identify the files or glob patterns which should be updated with the new version.
475476It is also possible to provide a pattern for each file, separated by colons (` : ` ).
476477
477478Commitizen will update its configuration file automatically (` pyproject.toml ` , ` .cz ` ) when bumping,
@@ -483,11 +484,12 @@ Some examples
483484
484485` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
485486
486- ``` toml
487+ ``` toml title="pyproject.toml"
487488[tool .commitizen ]
488489version_files = [
489490 " src/__version__.py" ,
490- " setup.py:version"
491+ " packages/*/pyproject.toml:version" ,
492+ " setup.py:version" ,
491493]
492494```
493495
@@ -496,8 +498,7 @@ This means that it will find a file `setup.py` and will only make a change
496498in a line containing the ` version ` substring.
497499
498500!!! note
499- Files can be specified using relative (to the execution) paths, absolute paths
500- or glob patterns.
501+ Files can be specified using relative (to the execution) paths, absolute paths, or glob patterns.
501502
502503---
503504
@@ -516,7 +517,7 @@ Some examples
516517
517518` pyproject.toml ` , ` .cz.toml ` or ` cz.toml `
518519
519- ``` toml
520+ ``` toml title="pyproject.toml"
520521[tool .commitizen ]
521522bump_message = " release $current_version → $new_version [skip-ci]"
522523```
@@ -529,7 +530,7 @@ When set to `true` the changelog is always updated incrementally when running `c
529530
530531Defaults to: ` false `
531532
532- ``` toml
533+ ``` toml title="pyproject.toml"
533534[tool .commitizen ]
534535update_changelog_on_bump = true
535536```
@@ -540,7 +541,7 @@ update_changelog_on_bump = true
540541
541542When set to ` true ` , Commitizen will create annotated tags.
542543
543- ``` toml
544+ ``` toml title="pyproject.toml"
544545[tool .commitizen ]
545546annotated_tag = true
546547```
@@ -551,7 +552,7 @@ annotated_tag = true
551552
552553When set to ` true ` , Commitizen will create gpg signed tags.
553554
554- ``` toml
555+ ``` toml title="pyproject.toml"
555556[tool .commitizen ]
556557gpg_sign = true
557558```
@@ -565,7 +566,7 @@ Useful during the initial development stage of your project.
565566
566567Defaults to: ` false `
567568
568- ``` toml
569+ ``` toml title="pyproject.toml"
569570[tool .commitizen ]
570571major_version_zero = true
571572```
@@ -591,7 +592,7 @@ execution of the script, some environment variables are available:
591592| ` CZ_PRE_INCREMENT ` | Whether this is a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
592593| ` CZ_PRE_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
593594
594- ``` toml
595+ ``` toml title="pyproject.toml"
595596[tool .commitizen ]
596597pre_bump_hooks = [
597598 " scripts/generate_documentation.sh"
@@ -618,7 +619,7 @@ release. During execution of the script, some environment variables are availabl
618619| ` CZ_POST_INCREMENT ` | Whether this was a ` MAJOR ` , ` MINOR ` or ` PATH ` release |
619620| ` CZ_POST_CHANGELOG_FILE_NAME ` | Path to the changelog file, if available |
620621
621- ``` toml
622+ ``` toml title="pyproject.toml"
622623[tool .commitizen ]
623624post_bump_hooks = [
624625 " scripts/slack_notification.sh"
@@ -631,7 +632,7 @@ Offset with which to start counting prereleases.
631632
632633Defaults to: ` 0 `
633634
634- ``` toml
635+ ``` toml title="pyproject.toml"
635636[tool .commitizen ]
636637prerelease_offset = 1
637638```
@@ -651,7 +652,7 @@ Options: `pep440`, `semver`, `semver2`
651652
652653Defaults to: ` pep440 `
653654
654- ``` toml
655+ ``` toml title="pyproject.toml"
655656[tool .commitizen ]
656657version_scheme = " semver"
657658```
0 commit comments