Skip to main content

Version Formats

Version Formats

Five Strategy Choices

Compare generated tag shapes, release stages, project-file conversion, and existing-tag ordering.

Commandcusty version update

Category

Reference

Quick Command

strategy + bump + release modifiers -> version

semverpep440commitizendategitcount

Strategy and Format Index​

Generated Version Families

PropertyTypeDescriptionDefaultRequired
semverSemantic versionSupports major, minor, patch, prerelease, development, post-style, and build metadata inputs through Custy's semantic-version helper.v1.2.3No
pep440Python package versionSupports PEP 440 alpha, beta, release candidate, development, post-release, local metadata, and epoch inputs.1.2.3No
commitizenCommit-derived SemVerRuns cz bump --dry-run --changelog, infers a bump, and is intended to delegate final generation to SemVer.-No
dateCalendar versionUses the current local date and includes the v prefix by default.vYYYY.MM.DDNo
gitcountRepository countUses the repository's total commit count as the numeric tag body.v123No

Common Shapes

Examples

Finalv1.2.3 or 1.2.3
Alphav1.2.3-alpha.1 or 1.2.3a1
Betav1.2.3-beta.1 or 1.2.3b1
Release candidatev1.2.3-rc.1 or 1.2.3rc1
Developmentv1.2.3-dev.1 or 1.2.3.dev1
Post releasev1.2.3-post.1 or 1.2.3.post1
Local/build metadatav1.2.3+linux or 1.2.3+linux
PEP 440 epoch1!2.0.0; generation supports epoch input, while the basic bridge does not preserve every advanced PEP 440 form.

Basic SemVer and PEP 440 Bridge

Supported conversion examples
text
PEP 440              SemVer-style
1.2.3a1       <->      v1.2.3-alpha.1
1.2.3b2       <->      v1.2.3-beta.2
1.2.3rc1      <->      v1.2.3-rc.1
1.2.3.dev1    <->      v1.2.3-dev.1
1.2.3.post1   <->      v1.2.3-post.1
1.2.3+linux   <->      v1.2.3+linux

VersionBridge performs basic conversion for compatible three-part versions. It returns no value for an invalid base and is not a complete implementation of every SemVer or PEP 440 edge case. Review conversions involving epochs, compound suffixes, or unusual local identifiers before writing project files.



Generation, Conversion, and Sorting Are Separate

  • A TagStrategy generates the next value.
  • VersionBridge converts compatible representations for project files.
  • A TagSorter orders tags already present in Git.
  • Commitizen generation produces SemVer-oriented output and therefore does not have a separate existing-tag sorter.
  • Supplying an explicit accepted tag bypasses automatic generation.

Continue