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
set the value for the new version (use the tag value),
20
+
instead of using unreleased
21
+
--incremental generates changelog from last created version, useful
22
+
if the changelog has been manually modified
23
+
--start-rev START_REV
24
+
start rev of the changelog.If not set, it will
25
+
generate changelog from the start
26
+
```
27
+
28
+
### Examples
8
29
9
30
```bash
10
31
cz changelog
@@ -14,15 +35,9 @@ cz changelog
14
35
cz ch
15
36
```
16
37
17
-
It has support for incremental changelog:
18
-
19
-
- Build from latest version found in changelog, this is useful if you have a different changelog and want to use chommitizen
20
-
- Update unreleased area
21
-
- Allows users to manually touch the changelog without being rewritten.
22
-
23
38
## Constrains
24
39
25
-
At the moment this features is constrained only to markdown files.
40
+
changelog generation is constrained only to **markdown** files.
26
41
27
42
## Description
28
43
@@ -55,6 +70,60 @@ and the following variables are expected:
55
70
56
71
- **required**: is the only one required to be parsed by the regex
57
72
73
+
## Configuration
74
+
75
+
### `unreleased_version`
76
+
77
+
There is usually an egg and chicken situation when automatically
78
+
bumping the version and creating the changelog.
79
+
If you bump the version first, you have no changelog, you have to
80
+
create it later, and it won't be included in
81
+
the release of the created version.
82
+
83
+
If you create the changelog before bumping the version, then you
84
+
usually don't have the latest tag, and the _Unreleased_ title appears.
85
+
86
+
By introducing `unreleased_version` you can prevent this situation.
87
+
88
+
Before bumping you can run:
89
+
90
+
```bash
91
+
cz changelog --unreleased_version="v1.0.0"
92
+
```
93
+
94
+
Remember to use the tag instead of the raw version number
95
+
96
+
For example if the format of your tag includes a `v` (`v1.0.0`), then you should use that,
97
+
if your tag is the same as the raw version, then ignore this.
98
+
99
+
Alternatively you can directly bump the version and create the changelog by doing
100
+
101
+
```bash
102
+
cz bump --changelog
103
+
```
104
+
105
+
### `file-name`
106
+
107
+
This value can be updated in the `toml` file with the key `changelog_file` under `tools.commitizen`
108
+
109
+
Specify the name of the output file, remember that changelog only works with markdown.
110
+
111
+
```bash
112
+
cz changelog --file-name="CHANGES.md"
113
+
```
114
+
115
+
### `incremental`
116
+
117
+
Benefits:
118
+
119
+
- Build from latest version found in changelog, this is useful if you have a different changelog and want to use commitizen
120
+
- Update unreleased area
121
+
- Allows users to manually touch the changelog without being rewritten.
122
+
123
+
```bash
124
+
cz changelog --incremental
125
+
```
126
+
58
127
## TODO
59
128
60
129
- [ ] support for hooks: this would allow introduction of custom information in the commiter, like a github or jira url. Eventually we could build a `CzConventionalGithub`, which would add links to commits
0 commit comments