Skip to content

Commit a9d1a13

Browse files
committed
Add dynamic version number
Means we can do version bumping with bump-my-version
1 parent 791274f commit a9d1a13

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

code/python/pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "datastar-py"
3-
version = "0.1.0"
43
description = "Helper functions and classes for the Datastar library (https://data-star.dev/)"
54
readme = "README.md"
65
authors = [
76
{ name = "Felix Ingram", email = "[email protected]" }
87
]
98
requires-python = ">=3.9"
109
dependencies = []
10+
dynamic=["version"]
1111

1212
[build-system]
1313
requires = ["hatchling"]
@@ -23,6 +23,12 @@ dev = [
2323
"uvicorn>=0.32.1",
2424
]
2525

26+
[tool.hatch.version]
27+
path = "src/datastar_py/__about__.py"
28+
29+
[[tool.bumpversion.files]]
30+
filename = "src/datastar_py/__about__.py"
31+
2632
[tool.bumpversion]
2733
current_version = "0.2.0"
2834
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
@@ -32,7 +38,7 @@ replace = "{new_version}"
3238
regex = false
3339
ignore_missing_version = false
3440
ignore_missing_files = false
35-
tag = true
41+
tag = false
3642
sign_tags = false
3743
tag_name = "v{new_version}"
3844
tag_message = "Bump version: {current_version} → {new_version}"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-FileCopyrightText: 2024-present Felix Ingram <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MIT
4+
__version__ = "0.2.0"

0 commit comments

Comments
 (0)