Skip to content

Commit 533fa73

Browse files
committed
pyproject.toml: lookup version from package.json
1 parent 0982c37 commit 533fa73

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

pyproject.toml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,19 @@ classifiers = [
3232
dependencies = [
3333
"jupyter-server>=2",
3434
]
35-
version = "0.3.3-dev"
35+
36+
dynamic = ["version"]
3637

3738
[project.license]
3839
file = "LICENSE"
3940

4041
[project.urls]
4142
Homepage = "https://github.com/manics/jupyter-offlinenotebook"
4243

44+
[tool.hatch.version]
45+
path = "package.json"
46+
pattern = "^\\s*\"version\":\\s*\"(?P<version>.+?)\""
47+
4348
[tool.hatch.build.targets.wheel.shared-data]
4449
"jupyter_offlinenotebook/etc/offlinenotebook_jpserverextension.json" = "etc/jupyter/jupyter_server_config.d/offlinenotebook_jpserverextension.json"
4550
"jupyter_offlinenotebook/static/lab/" = "share/jupyter/labextensions/jupyter-offlinenotebook/"
@@ -66,21 +71,3 @@ npm = [
6671
]
6772

6873
[tool.setuptools_scm]
69-
70-
[tool.tbump]
71-
field = [
72-
{ name = "channel", default = "" },
73-
{ name = "release", default = "" },
74-
]
75-
76-
[tool.tbump.version]
77-
current = "0.3.3.dev0"
78-
regex = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<channel>a|b|rc|.dev)(?P<release>\\d+))?"
79-
80-
[tool.tbump.git]
81-
message_template = "Bump to {new_version}"
82-
tag_template = "v{new_version}"
83-
84-
[[tool.tbump.file]]
85-
src = "pyproject.toml"
86-
version_template = "version = \"{major}.{minor}.{patch}{channel}{release}\""

0 commit comments

Comments
 (0)