diff --git a/pyproject.toml b/pyproject.toml index c67f17e5..da3328b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -176,13 +176,16 @@ commit_args = "--no-verify" tag = true tag_name = "{new_version}" allow_dirty = true -parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(\\.dev(?P\\d+))?" +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(\\.(?Pdev\\d+))?" serialize = [ - "{major}.{minor}.{patch}.dev{dev}", + "{major}.{minor}.{patch}.{dev}{distance_to_latest_tag}", "{major}.{minor}.{patch}" ] message = "Version updated from {current_version} to {new_version}" +[tool.bumpversion.parts.dev] +values = ["release", "dev"] + [[tool.bumpversion.files]] filename = "bumpversion/__init__.py"