Skip to content

Commit c51a15f

Browse files
authored
Update version format in pyproject.toml.jinja
1 parent d31c1ac commit c51a15f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project/pyproject.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ vcs = "git"
140140
style = "semver"
141141
pattern = "default-unprefixed"
142142
fallback-version = "1.0.0"
143-
format = "{base}+{distance}.{commit}"
143+
format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}+{{ distance }}.{{ commit }}{% endif %}"
144144
145145
[tool.hatch.build.hooks.version]
146146
path = "src/{{ python_package_import_name }}/__about__.py"

0 commit comments

Comments
 (0)