Skip to content

Bumping date with another segment does not produce expected result #3

@wallacms

Description

@wallacms

In my pyproject.toml I have:

[build-system]
requires = ["hatchling", "hatch-calver"]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "my_package/__init__.py"
scheme = "calver"
calver-scheme = 'YY.0M'

if the current version that hatch version reports is 25.05.1 and I run hatch version date,patch I would expect it to bump the version to 25.05.2. Instead it reports:

ValueError: Version `25.05.1` is not higher than the original version `25.05.1`

Running hatch version patch in this case does the right thing, but if the current version is 25.04.1 and the current date is May 21, 2025, then hatch version patch bumps the version to 25.04.2

I'd like to be able to run hatch version date,patch and have it always set the date according to the calver-scheme and then always increment the patch version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions