From 16012432a1d847da96394239efe7215afb1bbcf6 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 +- tutornotes/__about__.py | 6 ------ tutornotes/plugin.py | 5 +++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 41e7e69..0316dda 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name="tutor-notes", - version=about["__package_version__"], + version=about["__version__"], url="https://docs.tutor.overhang.io/", project_urls={ "Documentation": "https://docs.tutor.overhang.io/", diff --git a/tutornotes/__about__.py b/tutornotes/__about__.py index 5f3e59d..99e36f2 100644 --- a/tutornotes/__about__.py +++ b/tutornotes/__about__.py @@ -1,8 +1,2 @@ __version__ = "16.0.2" -__package_version__ = __version__ -# Handle version suffix for nightly, just like tutor core. -__version_suffix__ = "" - -if __version_suffix__: - __version__ += "-" + __version_suffix__ diff --git a/tutornotes/plugin.py b/tutornotes/plugin.py index ba4e077..66ea3a2 100644 --- a/tutornotes/plugin.py +++ b/tutornotes/plugin.py @@ -7,9 +7,14 @@ import pkg_resources from tutor import hooks as tutor_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__ + config = { "unique": { "MYSQL_PASSWORD": "{{ 8|random_string }}",