Create committing rules for projects auto bump versions and auto changelog generation
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] about 1 year ago
[master 114501d] bump: version 3.5.3 → 3.5.4
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 4d36818] bump: version 3.5.2 → 3.5.3
4 files changed, 14 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master cd818fe] bump: version 3.5.1 → 3.5.2
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master f7fcaf5] bump: version 3.5.0 → 3.5.1
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master e7d81d6] bump: version 3.4.1 → 3.5.0
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 54f8423] bump: version 3.4.0 → 3.4.1
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
version_schemes
as a commitizen.scheme
endpoint.[master ae35113] bump: version 3.3.0 → 3.4.0
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 3ececac] bump: version 3.2.2 → 3.3.0
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 4060cc2] bump: version 3.2.1 → 3.2.2
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master cbab456] bump: version 3.2.0 → 3.2.1
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 672ff94] bump: version 3.1.1 → 3.2.0
4 files changed, 24 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master bcd3988] bump: version 3.1.0 → 3.1.1
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
major_version_zero
customizable by third parties[master 167ce70] bump: version 3.0.1 → 3.1.0
4 files changed, 10 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
[master 996bff8] bump: version 3.0.0 → 3.0.1
4 files changed, 14 insertions(+), 4 deletions(-)
Published by github-actions[bot] over 1 year ago
Let me start by thanking all the contributors 🎉 🙏🏻 , who landed most of the features I'm showcasing in this release 🚀 .
Only if you are using a cz plugin (like cz-emoji). You'll have to ask the maintainer to update to the new plugin system.
Or if you were using python 3.6 which is no longer supported.
Otherwise you are safe to upgrade
This is the main breaking change.
This change is relevant for maintainers of cz plugins.
Plugins are now exposed as commitizen.plugin
entrypoints.
We no longer look at the package name and then for a discover_this
. Instead you'll have to register the entrypoint.
If you are using poetry, add to pyproject.toml
:
[tool.poetry.plugins."commitizen.plugin"]
cz_emoji = "cz_emoji:CzEmoji"
If you are using setup.py
you'll have to use:
from setuptools import setup
setup(
...
entry_points = {
'commitizen.plugin': [
'plugin = cz_emoji:CzEmoji'
]
}
...
)
Read about migrating-from-legacy-plugin-format
This amazing new feature will let you consume the version from what we call a "version provider", which is your project's version real source of truth. For example, a package.json
, or your Cargo.toml
.
Where before we had to modify the version in version_files
:
[tool.commitizen]
version = "2.42.1"
tag_format = "v$version"
version_files = [
"pyproject.toml:version",
"commitizen/__version__.py",
".pre-commit-config.yaml:rev:.+Commitizen"
]
Now you can tell commitizen from where to read the version:
[tool.commitizen]
version_provider = "poetry"
tag_format = "v$version"
version_files = [
"commitizen/__version__.py",
".pre-commit-config.yaml:rev:.+Commitizen"
]
You can see the source of truth for the version no longer belongs to the commitizen config.
With the new plugin system, you can write your own "version providers", and register them under the entrypoint commitizen.provider
.
Read about version-providers
With the release of v3
we finally support semver
. This is specially helpful when you are dealing with software that fully embraces semver
, like Rust or Helm.
Previously, pep440
was the only one supported (still the default). Which behaves the same as semver
, except when working with pre-releases.
If you are using python, we recommend sticking to pep440
, but for any other kind of project, move to semver
Usage:
[tool.commitizen]
version_type = "semver"
Read more in version-types
You can merge all the pre-releases as part of the next non-pre-release in the changelog.
Read about merge-prerelease
Add the setting to commitizen
[tools.commitizen]
# ...
changelog_merge_prerelease = true
And then you'll have to run
cz changelog
Sample snippet:
mkdir /tmp/cz-test && cd /tmp/cz-test
git init
cz init # press enter for everything
echo "changelog_merge_prerelease = true\n" >> .cz.toml
git add . && git commit -m "feat: start"
cz bump -pr rc
touch file1 && git add file1 && git commit -m "feat: add file1"
cz bump -pr rc
touch file2 && git add file2 && git commit -m "feat: add file2"
cz bump
cz changelog
cd -
rm -rf /tmp/cz-test
Mentioned because a breaking change is introduced. We use cz
as the entrypoint.
Check the repo commitizen-docker-image for more info.
The template to create plugins has been updated to support v3.
Full changelog below
commitizen.plugin
entrypointsscm
version providercommitizen.provider
endpoint for alternative versions providersTracebackType
or None
[master d07c029] bump: version 2.42.1 → 3.0.0
4 files changed, 30 insertions(+), 4 deletions(-)