Skip to content

Commit

Permalink
chore: Update versioning method to use code-based versioning in versi…
Browse files Browse the repository at this point in the history
…on.py
  • Loading branch information
rhoadesScholar committed Dec 23, 2024
1 parent 226982b commit 3044a44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = ["hatchling"]
build-backend = "hatchling.build"

# https://peps.python.org/pep-0621/
Expand Down Expand Up @@ -83,10 +83,8 @@ allow-direct-references = true

# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"

[tool.hatch.version.vcs]
tag_regex = "v(?P<version>\\d+\\.\\d+\\.\\d+)" # Customize this to match your tag format
source = "code"
path = "version.py"

# https://hatch.pypa.io/latest/config/build/#file-selection
# [tool.hatch.build.targets.sdist]
Expand Down
4 changes: 4 additions & 0 deletions version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from datetime import datetime


__version__ = datetime.now().strftime("%Y.%m.%d.%H%M%S")

0 comments on commit 3044a44

Please sign in to comment.