File tree 2 files changed +29
-0
lines changed
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 21
21
- Writing commits : ' tutorials/writing_commits.md'
22
22
- GitLab CI : ' tutorials/gitlab_ci.md'
23
23
- Github Actions : ' tutorials/github_actions.md'
24
+ - FAQ : ' faq.md'
24
25
- Exit Codes : ' exit_codes.md'
25
26
- Third-Party Commitizen Templates : ' third-party-commitizen.md'
26
27
- Contributing : ' contributing.md'
You can’t perform that action at this time.
0 commit comments