Versioning

Default Rules

By default, bumpwright maps API changes to version levels. See configuration for how to adjust these mappings.

API change → default bump

API change

Default bump

Added public symbol

minor

Removed public symbol

major

Added required parameter

major

Added optional parameter

minor

Removed required parameter

major

Removed optional parameter

minor

Parameter kind changed

major

Parameter default added or changed

minor

Parameter default removed

major

Custom Rules

Some analyser checks expose configuration switches under [rules].

Customisable rules

Rule

Default bump

[rules] key

Return type changed

minor

return_type_change

Parameter annotation changed

patch

param_annotation_change

Example override:

[rules]
return_type_change = "major"
param_annotation_change = "minor"

Summary

bumpwright supports Semantic Versioning (SemVer) and Calendar Versioning (CalVer). Select a scheme via [version].scheme (Version); SemVer is the default. CalVer encodes the release date as YYYY.MM.PATCH.

Note

Release bumps clear prerelease and local/build metadata.

SemVer vs CalVer

Format: MAJOR.MINOR.PATCH

  • major: 1.2.32.0.0

  • minor: 1.2.31.3.0

  • patch: 1.2.31.2.4

Format: YYYY.MM.PATCH

  • major: 2023.8.32024.1.0

  • minor: 2023.8.32023.9.0

  • patch: 2023.8.32023.8.4

CLI

Decide the next version (decide):

$ bumpwright decide --format md
bumpwright suggests: patch
$ bumpwright --config calver.toml decide --format md
bumpwright suggests: patch

Apply a bump (bump):

$ bumpwright bump --dry-run --format md
New version: 1.3.0
$ bumpwright --config calver.toml bump --dry-run --format md
New version: 2023.9.0

Glossary

prerelease

labels like -rc.1 marking early releases.

local/build

metadata after + used for build tracking.

See concepts/configuration and glossary for details.