What's new in 2.2.0? 🆕
git-cliff is a command-line tool (written in Rust) that provides a highly customizable way to generate changelogs from git history.
It supports using custom regular expressions to alter changelogs which are mostly based on conventional commits. With a single configuration file, a wide variety of formats can be applied for a changelog, thanks to the Jinja2/Django-inspired template engine.
More information and examples can be found in the GitHub repository.
What's new? ⛰️
The full changelog can be found here.
🎈 Configurable Bump Rules
If you are a frequent user of --bump
/--bumped-version
flags then this new feature is for you!
git-cliff
now supports customizing the behavior of version bumps.
Add the following section to your cliff.toml
for configuration:
[bump]
# Configures automatic minor version increments for feature changes.
#
# When true, a feature will always trigger a minor version update.
#
# When false, a feature will trigger:
# - a patch version update if the major version is 0.
# - a minor version update otherwise.
features_always_bump_minor = true
# Configures 0 -> 1 major version increments for breaking changes.
#
# When true, a breaking change commit will always trigger a major version update
# (including the transition from version 0 to 1)
#
# When false, a breaking change commit will trigger:
# - a minor version update if the major version is 0.
# - a major version update otherwise.
breaking_always_bump_major = true
🛠️ Better Template Errors
Template rendering errors are now more verbose!
For example, let's throw an error in the template with using throw function:
[changelog]
body = """
{{ throw(message="something happened!") }}
"""
When you run git-cliff
:
ERROR git_cliff > Template render error:
Function call 'throw' failed
something happened!