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
|`$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