-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(changelog): handle custom tag_format in changelog generation
When the tag_format does not follow the allowed schemas patterns then changlog generation fails.
- Loading branch information
Showing
5 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Configuring commitizen in a monorepo | ||
|
||
This tutorial assumes the monorepo layout is designed with multiple components that can be released independently of each other, | ||
some suggested layouts: | ||
|
||
``` | ||
library-a | ||
.cz.toml | ||
library-b | ||
.cz.toml | ||
``` | ||
|
||
``` | ||
src | ||
library-b | ||
.cz.toml | ||
library-z | ||
.cz.toml | ||
``` | ||
|
||
Each component will have its own changelog, commits will need to use scopes so only relevant commits are included in the | ||
appropriate change log for a given component. Example config and commit for `library-b` | ||
|
||
```toml | ||
[tool.commitizen] | ||
name = "cz_customize" | ||
version = "0.0.0" | ||
tag_format = "${version}-library-b" # the component name can be a prefix or suffix with or without a separator | ||
update_changelog_on_bump = true | ||
|
||
[tool.commitizen.customize] | ||
changelog_pattern = "^(feat|fix)\\(library-b\\)(!)?:" #the pattern on types can be a wild card or any types you wish to include | ||
``` | ||
|
||
example commit message for the above | ||
|
||
`fix:(library-b) Some awesome message` | ||
|
||
If the above is followed and the `cz bump --changelog` is run in the directory containing the component the changelog | ||
should be generated in the same directory with only commits scoped to the component. |