From f49a6425b4fc25352768ed0e306369d4134b5ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 20 Nov 2023 17:39:46 +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 +- tutorjupyter/__about__.py | 6 ------ tutorjupyter/plugin.py | 5 +++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 137c7ef..c22c1d8 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def load_about(): setup( name="tutor-jupyter", - version=ABOUT["__package_version__"], + version=ABOUT["__version__"], url="https://github.com/overhangio/tutor-jupyter", project_urls={ "Code": "https://github.com/overhangio/tutor-jupyter", diff --git a/tutorjupyter/__about__.py b/tutorjupyter/__about__.py index 856e0a9..d945113 100644 --- a/tutorjupyter/__about__.py +++ b/tutorjupyter/__about__.py @@ -1,8 +1,2 @@ __version__ = "16.0.1" -__package_version__ = __version__ -# Handle version suffix for nightly, just like tutor core. -__version_suffix__ = "" - -if __version_suffix__: - __version__ += "-" + __version_suffix__ diff --git a/tutorjupyter/plugin.py b/tutorjupyter/plugin.py index 4e7674c..08c23c5 100644 --- a/tutorjupyter/plugin.py +++ b/tutorjupyter/plugin.py @@ -8,9 +8,14 @@ import pkg_resources from tutor import hooks +from tutor.__about__ import __version_suffix__ from .__about__ import __version__ +# Handle version suffix in nightly mode, just like tutor core +if __version_suffix__: + __version__ += "-" + __version_suffix__ + ######################################## # CONFIGURATION ########################################