File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,39 @@ configuration are consistent before bumping version.
99
99
cz bump --check-consistency
100
100
```
101
101
102
+ For example, if we have ` pyproject.toml `
103
+
104
+ ``` toml
105
+ [tool .commitizen ]
106
+ version = " 1.21.0"
107
+ version_files = [
108
+ " src/__version__.py" ,
109
+ " setup.py" ,
110
+ ]
111
+ ```
112
+
113
+ ` src/__version__.py ` ,
114
+
115
+ ``` python
116
+ __version__ = " 1.21.0"
117
+ ```
118
+
119
+ and ` setup.py ` .
120
+
121
+ ``` python
122
+ ...
123
+ version= " 1.0.5"
124
+ ...
125
+ ```
126
+
127
+ If ` --check-consistency ` is used, commitizen will check whether the current version in ` pyproject.toml `
128
+ exists in all version_files and find out it does not exist in ` setup.py ` and fails.
129
+ However, it will still update ` pyproject.toml ` and ` src/__version__.py ` .
130
+
131
+ To fix it, you'll first ` git checkout . ` to reset to the status before trying to bump and update
132
+ the version in ` setup.py ` to ` 1.21.0 `
133
+
134
+
102
135
## Configuration
103
136
104
137
### ` tag_format `
You can’t perform that action at this time.
0 commit comments