Skip to content

Commit 501a5fc

Browse files
Fix dev distance versioning on main
Override the describe command for setuptools_scm
1 parent 56c26cc commit 501a5fc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ version_scheme = "duckdb_packaging.setuptools_scm_version:version_scheme"
8888
local_scheme = "no-local-version"
8989
fallback_version = "0.0.1.dev1"
9090

91+
# main only: count dev distance from the last *minor* tag (v*.*.0), so a patch
92+
# tag (e.g. v1.5.4) merged in from a release branch can't reset .devN.
93+
# Release branches must NOT have this, they correctly count from v*.*.* (the default).
94+
[tool.setuptools_scm.scm.git]
95+
describe_command = "git describe --dirty --tags --long --abbrev=40 --match v*.*.0"
96+
9197
# Override: if COVERAGE is set then:
9298
# - we create a RelWithDebInfo build
9399
# - we make sure we use a persistent build dir so we get access to the .gcda files

0 commit comments

Comments
 (0)