Skip to content

Commit

Permalink
chore: update cargo-release to use git-cliff
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Mar 3, 2023
1 parent 59e35a2 commit c4d8d33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ allow-branch = ["main"]
sign-commit = true
sign-tag = true
pre-release-commit-message = "chore(release): prepare for {{version}}"
post-release-commit-message = "chore(release): bump version to {{next_version}}"
pre-release-replacements = [
{ file="CHANGELOG.md", search="## \\[unreleased\\]", replace = "## [unreleased]\n\n## [{{version}}] – {{date}}", exactly = 1 },
{ file="CHANGELOG.md", search="HEAD", replace = "{{tag_name}}", exactly = 1 },
{ file="CHANGELOG.md", search="\\[unreleased\\]: ", replace = "[unreleased]: https://github.com/oddlama/autokernel/compare/{{tag_name}}...HEAD\n[{{version}}]: ", exactly = 1 },
]
pre-release-hook = ["git-cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}"]

[package.metadata.deb]
section = "utils"
Expand Down
8 changes: 4 additions & 4 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ body = """
## [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 %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}(**BREAKING**) {% endif %}{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
trim = true
Expand Down

0 comments on commit c4d8d33

Please sign in to comment.