Skip to content

Commit 51b4eb5

Browse files
committed
Enable automatic versioning from Git tags
- Use hatch-vcs to automatically derive version from Git tags - Remove hardcoded version number from pyproject.toml - Version will now be automatically extracted from latest Git tag - Eliminates need to manually update version in pyproject.toml
1 parent e25dbc4 commit 51b4eb5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

toolchain/pyproject.toml

Lines changed: 8 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,9 @@ dependencies = [
5656

5757
[tool.hatch.metadata]
5858
allow-direct-references = true
59+
60+
[tool.hatch.version]
61+
source = "vcs"
62+
63+
[tool.hatch.build.hooks.vcs]
64+
version-file = "mfc/_version.py"

0 commit comments

Comments
 (0)