Bump versions automagically
Bump versions based on changelog entries.
Setup
This package only works together with scriv and works best if used with hatch.
In the scriv configuration the following is assumed:
[tool.scriv]
format = "md"
categories = [
"Major: Feature",
"Minor: Feature",
"Minor: Fix",
"Patch: Fix",
"Major: Business impact",
"Minor: Business impact"
]
You can adjust the categories as you like the BUMB: part is what is checked for, and the bumps must be Major, Minor, Patch
For a nice integration in hatch use these two additional env definition blocks:
[tool.hatch.envs.changelog]
dependencies = [
"scriv",
"changelog-version"
]
[tool.hatch.envs.changelog.scripts]
init = "mkdir changelog.d"
new = "scriv create --edit --add"
collate = "scriv print > temp.md && hatch version $(changelog-version-bump) && scriv collect"
-
Initial setup needed once is the
initpart (feel free to not bother with a seperate command). -
In each branch you'll need to run
scriv createorhatch run changelog:newto create and edit the changelog fragment for scriv. -
The actual magic is the
collatecomand that should run inci/cdwhen you create tags / releases.
Pre-commit hook
This was originally created by TypicalArray.
Some places (like Azure DevOps) do not render .md files automatically. So in order to clean them up, this repo also contains a pre-commit hook which automatically removes all commented out lines, removes superfluous empty lines and enforces that all lines have to start with a # or a -, which helps with formatting. It can be used as follows:
repos:
- repo: https://github.com/banking-circle-advanced-analytics/changelog-version-bump
rev: <insert-latest-release>
hooks:
- id: remove-comments
FAQ
Can you change the options and headings? No. It would be easy to add configurability via the toml and a tool.changelog-version-bump section but for now I see no need, the defaults should suffice.
Could this not just be some bash? Yes. This code was actually bash, but for distribution and later configuration, see above, python scripts are easier.
Release files for changelog-version-bump 0.4.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| changelog_version_bump-0.4.9.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| changelog_version_bump-0.4.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.3 kB
Release files / changelog_version_bump-0.4.9.tar.gz
| Download URL | changelog_version_bump-0.4.9.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28f560427afb0b95229f73bb5fe97de0cbec85ca4849044acccc893cf52b7144
|
|
BLAKE2b-256 checksum How to use checksums |
d13ec488c19ce2ba48e8a8a03db5aeffc85f9fce4a79bc918dc946e6522ac6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 30, 2026.
Transparency logRelease files / changelog_version_bump-0.4.9-py3-none-any.whl
| Download URL | changelog_version_bump-0.4.9-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecd48fe74e02ed1bd492de1e3a821632f3690e0ed51e9f7098e9dde9d3e5a8c7
|
|
BLAKE2b-256 checksum How to use checksums |
a57337e9cc019ae841abc292c426e27121e2067009c2a9c26e267ed529278036
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 30, 2026.
Transparency log