changeset 1519:01b8d68edd70

version: use standard Python's `dev0` instead of Libervia specific `D` for dev version
author Goffi <goffi@goffi.org>
date Tue, 06 Jun 2023 17:40:16 +0200
parents eb00d593801d
children 88f99488e604
files libervia/web/VERSION libervia/web/common/constants.py libervia/web/server/server.py setup.py
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/web/VERSION	Fri Jun 02 16:49:28 2023 +0200
+++ b/libervia/web/VERSION	Tue Jun 06 17:40:16 2023 +0200
@@ -1,1 +1,1 @@
-0.9.0D
+0.9.0.dev0
--- a/libervia/web/common/constants.py	Fri Jun 02 16:49:28 2023 +0200
+++ b/libervia/web/common/constants.py	Tue Jun 06 17:40:16 2023 +0200
@@ -25,7 +25,7 @@
 
     # XXX: we don't want to use the APP_VERSION inherited from libervia.backend.core.constants version
     #      as we use this version to check that there is not a mismatch with backend
-    APP_VERSION = "0.9.0D"  # Please add 'D' at the end for dev versions
+    APP_VERSION = "0.9.0.dev0"
     LIBERVIA_MAIN_PAGE = "libervia.html"
     LIBERVIA_PAGE_START = "/login"
 
--- a/libervia/web/server/server.py	Fri Jun 02 16:49:28 2023 +0200
+++ b/libervia/web/server/server.py	Tue Jun 06 17:40:16 2023 +0200
@@ -669,7 +669,7 @@
     def full_version(self):
         """Return the full version of Libervia (with extra data when in dev mode)"""
         version = self.version
-        if version[-1] == "D":
+        if version.split(".")[-1] == "dev0":
             # we are in debug version, we add extra data
             try:
                 return self._version_cache
--- a/setup.py	Fri Jun 02 16:49:28 2023 +0200
+++ b/setup.py	Tue Jun 06 17:40:16 2023 +0200
@@ -42,14 +42,14 @@
 
 with open(os.path.join(DIR_NAME, "VERSION")) as v:
     VERSION = v.read().strip()
-is_dev_version = VERSION.endswith("D")
+is_dev_version = VERSION.endswith(".dev0")
 
 
 def libervia_dev_version():
     """Use mercurial data to compute version"""
 
     def version_scheme(version):
-        return VERSION.replace("D", ".dev0")
+        return VERSION
 
     def local_scheme(version):
         return "+{rev}.{distance}".format(rev=version.node[1:], distance=version.distance)