Bump My Version Workflow

This repository uses Bump My Version to automate the versioning with the project.

Version Bumps

The different version bumps that this project uses are:

  • major - Significant changes to the project that create fundamental changes to the project where the use should expect compatibility problems.

  • minor - Changes that add or improve capabilities in the project that normally should not result in compatibility problems. When that is unavoidable, the release notes need to clearly state what the problems are.

  • patch - Minor changes and bug-fixes that will not affect compatibility.

Show Bump Options

To show the available options to bump the current version, use the folowing command:

uv run bump-my-version show-bump

This will show what bumping the major, minor, or patch will do. For example:

1.1.1 ── bump ─┬─ major ─ 2.0.0
               ├─ minor ─ 1.2.0
               ╰─ patch ─ 1.1.2

Testing Version Bump

Before actually bumping the version, you should do a dry run to make sure there are no errors. The following command can be used to dry run bumping the minor version:

uv run bump-my-version bump minor --dry-run

Bumping a Version

Once you are ready to change the version, the --dry-run flag can be removed. The following command will bump the minor version throughout the project:

uv run bump-my-version bump minor

Additional Files with Version Info

By default, there are 4 project files that will be changed. They are:

  • pyproject.toml

  • src/buffalo_example/__init__.py

  • sphinx/source/conf.py

  • CITATION.cff

If you add more files to the project that need versioning tracked, then you need to add them into the tool.bumpversion section of pyproject.toml. Check out Bump My Version’s documentation for detauls.