File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ ## Support for PEP621
2+
3+ PEP621 establishes a ` [project] ` definition inside ` pyproject.toml `
4+
5+ ``` toml
6+ [project ]
7+ name = " spam"
8+ version = " 2020.0.0"
9+ ```
10+
11+ Commitizen ** won't** use the ` project.version ` as a source of truth because it's a
12+ tool aimed for any kind of project.
13+
14+ If we were to use it, it would increase the complexity of the tool. Also why
15+ wouldn't we support other project files like ` cargo.toml ` or ` package.json ` ?
16+
17+ Instead of supporting all the different project files, you can use ` version_files `
18+ inside ` [tool.commitizen] ` , and it will cheaply keep any of these project files in sync
19+
20+ ``` toml
21+ [tool .commitizen ]
22+ version = " 2.5.1"
23+ version_files = [
24+ " pyproject.toml:^version" ,
25+ " cargo.toml:^version" ,
26+ " package.json:\" version\" :"
27+ ]
28+ ```
Original file line number Diff line number Diff line change 2121 - Writing commits : ' tutorials/writing_commits.md'
2222 - GitLab CI : ' tutorials/gitlab_ci.md'
2323 - Github Actions : ' tutorials/github_actions.md'
24+ - FAQ : ' faq.md'
2425 - Exit Codes : ' exit_codes.md'
2526 - Third-Party Commitizen Templates : ' third-party-commitizen.md'
2627 - Contributing : ' contributing.md'
You can’t perform that action at this time.
0 commit comments