diff --git a/jupyter_server/_version.py b/jupyter_server/_version.py index 5fa5f8caaf..46a4d50eef 100644 --- a/jupyter_server/_version.py +++ b/jupyter_server/_version.py @@ -2,15 +2,5 @@ store the current version info of the server. """ -import re - -# Version string must appear intact for tbump versioning -__version__ = "1.12.1" - -# Build up version_info tuple for backwards compatibility -pattern = r"(?P\d+).(?P\d+).(?P\d+)(?P.*)" -match = re.match(pattern, __version__) -parts = [int(match[part]) for part in ["major", "minor", "patch"]] -if match["rest"]: - parts.append(match["rest"]) -version_info = tuple(parts) +version_info = (1, 12, 1, "", "") +__version__ = ".".join(map(str, version_info[:3])) + "".join(version_info[3:]) diff --git a/pyproject.toml b/pyproject.toml index b9ea0b60e1..36ef5fb55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,3 +30,12 @@ tag_template = "v{new_version}" [[tool.tbump.file]] src = "jupyter_server/_version.py" +version_template = '({major}, {minor}, {patch}, "{channel}", "{release}")' + +[[tool.tbump.field]] +name = "channel" +default = "" + +[[tool.tbump.field]] +name = "release" +default = ""