Skip to content

Commit ec01fb7

Browse files
authored
Enable automatic versioning from Git tags (MFlowCode#1064)
1 parent 77ddd1e commit ec01fb7

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ __pycache__
1919

2020
*.egg-info
2121

22+
# Auto-generated version file
23+
toolchain/mfc/_version.py
24+
2225
.DS_Store
2326

2427
/tests/*/**

toolchain/pyproject.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

55
[project]
66
name = "mfc"
7-
version = "4.9.6"
7+
dynamic = ["version"]
88
dependencies = [
99
# General
1010
"rich",
@@ -56,3 +56,14 @@ dependencies = [
5656

5757
[tool.hatch.metadata]
5858
allow-direct-references = true
59+
60+
[tool.hatch.version]
61+
source = "vcs"
62+
63+
[tool.hatch.version.raw-options]
64+
root = ".."
65+
relative_to = "pyproject.toml"
66+
version_file = "mfc/_version.py"
67+
68+
[tool.hatch.build.hooks.vcs]
69+
version-file = "mfc/_version.py"

0 commit comments

Comments
 (0)