Skip to main content

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"
  1. Initial setup needed once is the init part (feel free to not bother with a seperate command).

  2. In each branch you'll need to run scriv create or hatch run changelog:new to create and edit the changelog fragment for scriv.

  3. The actual magic is the collate comand that should run in ci/cd when 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)

Source distribution for changelog-version-bump 0.4.9
File Size Uploaded
changelog_version_bump-0.4.9.tar.gz 16.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for changelog-version-bump 0.4.9
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.4.9 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page