1
-
2
1
![ Bump version] ( images/bump.gif )
3
2
4
3
## About
@@ -15,11 +14,11 @@ The version format follows [semantic versioning][semver].
15
14
16
15
This means ` MAJOR.MINOR.PATCH `
17
16
18
- | Increment | Description | Conventional commit map |
19
- | ------- | ----- | ------ |
20
- | ` MAJOR ` | Breaking changes introduced | ` BREAKING CHANGE ` |
21
- | ` MINOR ` | New features | ` feat ` |
22
- | ` PATCH ` | Fixes | ` fix ` + everything else |
17
+ | Increment | Description | Conventional commit map |
18
+ | --------- | --------------------------- | ----------------- ------ |
19
+ | ` MAJOR ` | Breaking changes introduced | ` BREAKING CHANGE ` |
20
+ | ` MINOR ` | New features | ` feat ` |
21
+ | ` PATCH ` | Fixes | ` fix ` + everything else |
23
22
24
23
Prereleases are supported following python's [ PEP 0440] [ pep440 ]
25
24
@@ -71,10 +70,9 @@ optional arguments:
71
70
manually specify the desired increment
72
71
```
73
72
74
-
75
73
## Configuration
76
74
77
- ` tag_format `
75
+ ### ` tag_format `
78
76
79
77
Used to read the format from the git tags, and also to generate the tags.
80
78
@@ -90,7 +88,6 @@ cz bump --tag_format="v$minor.$major.$path$prerelease"
90
88
91
89
In your ` pyproject.toml `
92
90
93
-
94
91
[tool.commitizen]
95
92
tag_format = "v$minor.$major.$path$prerelease"
96
93
@@ -103,20 +100,23 @@ The variables must be preceded by a `$` sign.
103
100
104
101
Suppported variables:
105
102
106
- | Variable | Description |
107
- | --- | ----------- |
108
- | ` $version ` | full generated version |
109
- | ` $major ` | MAJOR increment |
110
- | ` $minor ` | MINOR increment |
111
- | ` $patch ` | PATCH increment |
103
+ | Variable | Description |
104
+ | ------------- | ------------------------------- ----------- |
105
+ | ` $version ` | full generated version |
106
+ | ` $major ` | MAJOR increment |
107
+ | ` $minor ` | MINOR increment |
108
+ | ` $patch ` | PATCH increment |
112
109
| ` $prerelease ` | Prerelase (alpha, beta, release candidate) |
113
110
114
- ` files `
111
+ ---
112
+
113
+ ### ` files `
115
114
116
115
Used to identify the files which should be updated with the new version.
117
- In your ` pyproject.toml `
116
+ It is also possible to provide a pattern for each file, separated by colons ( ` : ` ).
118
117
119
- Commitizen will update it's configuration (` pyproject.toml ` , ` .cz ` ) when bumping.
118
+ Commitizen will update it's configuration file automatically (` pyproject.toml ` , ` .cz ` ) when bumping,
119
+ regarding if the file is present or not in ` files ` .
120
120
121
121
Some examples
122
122
@@ -125,30 +125,33 @@ Some examples
125
125
[tool.commitizen]
126
126
files = [
127
127
"src/__version__.py",
128
- "setup.py"
128
+ "setup.py:version "
129
129
]
130
130
131
-
132
131
` .cz `
133
132
134
133
[commitizen]
135
134
files = [
136
135
"src/__version__.py",
137
- "setup.py"
136
+ "setup.py:version "
138
137
]
139
138
140
- ` bump_message `
139
+ In the example above, we can see the reference ` "setup.py:version" ` .
140
+ This means that it will find a file ` setup.py ` and will only make a change
141
+ in a line containing the ` version ` substring.
141
142
142
- Template used to specify the commit message generated when bumping
143
+ ---
143
144
144
- defaults to: ` bump: version $current_version → $new_version `
145
+ ### ` bump_message `
145
146
147
+ Template used to specify the commit message generated when bumping
146
148
149
+ defaults to: ` bump: version $current_version → $new_version `
147
150
148
- | Variable | Description |
149
- | --- | ----------- |
151
+ | Variable | Description |
152
+ | ------------------ | ------------------------ ----------- |
150
153
| ` $current_version ` | the version existing before bumping |
151
- | ` $new_version ` | version generated after bumping |
154
+ | ` $new_version ` | version generated after bumping |
152
155
153
156
Some examples
154
157
@@ -162,7 +165,6 @@ Some examples
162
165
[commitizen]
163
166
bump_message = release $current_version → $new_version [skip-ci]
164
167
165
-
166
168
## Custom bump
167
169
168
170
Read the [ customizing section] ( ./customization.md ) .
0 commit comments