Skip to content

Commit c804887

Browse files
authored
Fix versioning (#10)
We need to specify version metadata in this special annoying way where we specify the git describe command as well as the regex to find versions within the tag names.
1 parent 3fa68c1 commit c804887

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

hatch-dependency-coversion/pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ Changelog = "https://github.com/Opentrons/hatch-plugins/tree/main/hatch-dependen
3939
[tool.hatch.version]
4040
source = "vcs"
4141
fallback-version = "0.0.0-dev"
42-
tag-pattern = "hatch-dependency-coversion@(?P<version>)"
42+
tag-pattern = "hatch-dependency-coversion@(?P<version>[0-9]+\\.[0-9]+\\.[0-9]+((a|b|\\.alpha-|\\.beta-)[0-9]+)?)"
4343

4444
[tool.hatch.build.hooks.vcs]
4545
version-file = "src/hatch_dependency_coversion/_version.py"
4646

47+
[tool.hatch.version.raw-options]
48+
git_describe_command = "git describe --dirty --tags --long --match hatch-dependency-coversion@*"
49+
root = "../"
50+
4751
[tool.hatch.envs.maintenance]
4852
dependencies = [
4953
"towncrier"

hatch-vcs-tunable/pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ Changelog = "https://github.com/Opentrons/hatch-plugins/tree/main/hatch-vcs-tuna
4141
[tool.hatch.version]
4242
source = "vcs"
4343
fallback-version = "0.0.0-dev"
44-
tag-pattern = 'hatch-vcs-tunable@(?P<version>)'
44+
tag-pattern = "hatch-vcs-tunable@(?P<version>[0-9]+\\.[0-9]+\\.[0-9]+((a|b|\\.alpha-|\\.beta-)[0-9]+)?)"
4545

4646
[tool.hatch.build.hooks.vcs]
4747
version-file="src/hatch_vcs_tunable/_version.py"
4848

49+
[tool.hatch.version.raw-options]
50+
git_describe_command = "git describe --dirty --tags --long --match hatch-vcs-tunable@*"
51+
root = "../"
52+
4953
[tool.hatch.envs.maintenance]
5054
dependencies = [
5155
"towncrier"

0 commit comments

Comments
 (0)