Skip to content

Commit afe4ac1

Browse files
authored
Fix setuptools-scm versioning (#3887)
1 parent 381b28d commit afe4ac1

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ name: release
99
jobs:
1010
# https://github.com/marketplace/actions/actions-tagger
1111
actions-tagger:
12+
needs: pypi # do not move the mobile tag until we publish
1213
runs-on: windows-latest
1314
permissions:
1415
# Give the default GITHUB_TOKEN write permission.

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,15 @@ dependencies = { file = [".config/requirements.in"] }
288288

289289
[tool.setuptools_scm]
290290
local_scheme = "no-local-version"
291+
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
291292
write_to = "src/ansiblelint/_version.py"
293+
# To prevent accidental pick of mobile version tags such 'v6'
294+
git_describe_command = [
295+
"git",
296+
"describe",
297+
"--dirty",
298+
"--tags",
299+
"--long",
300+
"--match",
301+
"v*.*",
302+
]

0 commit comments

Comments
 (0)