From db95c55f14a3aa65fc4ca667b93d4a8eec7a227b Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Mon, 8 Jul 2024 17:11:34 -0700 Subject: [PATCH] Attempts to get dynamic versioning to output something semver --- pyproject.toml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0b433fe03b9d..a9a66f06330b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,17 +119,26 @@ legacy_keyring = ["keyrings.cryptfile"] [tool.poetry-dynamic-versioning] enable = true vcs = "git" -dirty = true pattern = "default-unprefixed" -# format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}.dev{{ distance }}{% endif %}{% if dirty %}+dirty{% endif %}" format-jinja = """ {%- if distance == 0 -%} - {{ serialize_pep440(base, stage, revision) }} + {%- if stage is none -%} + {{ base }} + {%- else -%} + {{ base }}-{{stage}}{{revision}} + {%- endif -%} {%- else -%} - {{ serialize_pep440(base, stage, revision, dev=distance) }} + {{ base }}-{{stage}}{{revision}}.dev{{ distance }} {%- endif -%} """ -style = "pep440" +#format-jinja = """ +# {%- if distance == 0 -%} +# {{ serialize_pep440(base, stage, revision) }} +# {%- else -%} +# {{ serialize_pep440(base, stage, revision, dev=distance) }} +# {%- endif -%} +#""" +style = "semver" bump = true [build-system]