From 998de5eb006fe9471d6e78e7cca9bbb8fe71373e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 20 Nov 2023 17:39:47 +0100 Subject: [PATCH] feat: simplify nightly version management By pulling the version suffix from tutor, we avoid git conflicts when merging the release branch in nightly. --- setup.py | 2 +- tutorwebui/__about__.py | 7 ------- tutorwebui/plugin.py | 5 +++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index cdda031..9271dea 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def load_about(): setup( name="tutor-webui", - version=ABOUT["__package_version__"], + version=ABOUT["__version__"], url="https://overhang.io/overhangio/tutor-webui", project_urls={ "Documentation": "https://docs.tutor.overhang.io/", diff --git a/tutorwebui/__about__.py b/tutorwebui/__about__.py index 6d477ab..1722f39 100644 --- a/tutorwebui/__about__.py +++ b/tutorwebui/__about__.py @@ -1,9 +1,2 @@ __version__ = "16.0.0" -__package_version__ = __version__ - -# Handle version suffix for nightly, just like tutor core. -__version_suffix__ = "" - -if __version_suffix__: - __version__ += "-" + __version_suffix__ diff --git a/tutorwebui/plugin.py b/tutorwebui/plugin.py index ddc6bd5..7848821 100644 --- a/tutorwebui/plugin.py +++ b/tutorwebui/plugin.py @@ -1,7 +1,12 @@ from tutor import hooks as tutor_hooks +from tutor.__about__ import __version_suffix__ from .__about__ import __version__ from . import cli +# Handle version suffix in nightly mode, just like tutor core +if __version_suffix__: + __version__ += "-" + __version_suffix__ + tutor_hooks.Filters.CLI_COMMANDS.add_items( [ cli.shell,