-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(changelog): support count_tags option (#599)
* feat: support count_tags option Signed-off-by: tison <wander4096@gmail.com> * add fixures tags Signed-off-by: tison <wander4096@gmail.com> * fixup Signed-off-by: tison <wander4096@gmail.com> * add count_tags to args Signed-off-by: tison <wander4096@gmail.com> * add docs Signed-off-by: tison <wander4096@gmail.com> * run cargo fmt Signed-off-by: tison <wander4096@gmail.com> * fixup default to true Signed-off-by: tison <wander4096@gmail.com> * docs(website): update documentation about count_tags --------- Signed-off-by: tison <wander4096@gmail.com> Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
- Loading branch information
Showing
11 changed files
with
106 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[changelog] | ||
# changelog header | ||
header = """ | ||
# Changelog\n | ||
All notable changes to this project will be documented in this file.\n | ||
""" | ||
# template for the changelog body | ||
# https://keats.github.io/tera/docs/#introduction | ||
body = """ | ||
{% if version %}\ | ||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
{% else %}\ | ||
## [unreleased] | ||
{% endif %}\ | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
### {{ group | upper_first }} | ||
{% for commit in commits %} | ||
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ | ||
{% endfor %} | ||
{% endfor %}\n | ||
""" | ||
# template for the changelog footer | ||
footer = """ | ||
<!-- generated by git-cliff --> | ||
""" | ||
# remove the leading and trailing whitespace from the templates | ||
trim = true | ||
|
||
[git] | ||
# regex for skipping tags | ||
skip_tags = "v0.1.0-beta.1" | ||
# regex for ignoring tags | ||
ignore_tags = "v.*-beta.*" | ||
count_tags = "v0.2.0" |
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,15 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add skip feature" | ||
git tag v0.1.0-beta.1 | ||
|
||
GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 1" | ||
GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" | ||
git tag v0.1.0 | ||
|
||
GIT_COMMITTER_DATE="2021-01-23 01:23:48" git commit --allow-empty -m "feat: add feature 2" | ||
git tag v0.2.0-beta.1 | ||
|
||
GIT_COMMITTER_DATE="2021-01-23 01:23:49" git commit --allow-empty -m "feat: add feature 3" | ||
git tag v0.2.0 |
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,14 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
## [0.2.0] - 2021-01-23 | ||
|
||
### Feat | ||
|
||
- Add feature 1 | ||
- Fix feature 1 | ||
- Add feature 2 | ||
- Add feature 3 | ||
|
||
<!-- generated by git-cliff --> |
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
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