From 90a36078991ad8e7f1f7ab340c0fbf42de3a3977 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 7 Mar 2024 09:00:25 -0500 Subject: [PATCH] Remove hard-coding of RAPIDS version Issue: https://github.com/rapidsai/build-planning/issues/15 --- ci/release/update-version.sh | 4 ---- docs/source/conf.py | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 7531110c2..12816e1b3 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -30,10 +30,6 @@ function sed_runner() { sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak } -# RTD update -sed_runner 's/version = .*/version = "'"${NEXT_SHORT_TAG}"'"/g' docs/source/conf.py -sed_runner 's/release = .*/release = "'"${NEXT_FULL_TAG}"'"/g' docs/source/conf.py - # Centralized version file update echo "${NEXT_FULL_TAG}" > VERSION diff --git a/docs/source/conf.py b/docs/source/conf.py index 9171bc9cc..a7d832627 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,6 +21,9 @@ # import os import sys +from packaging.version import Version + +import cucim sys.path.insert(0, os.path.abspath("../..")) curpath = os.path.dirname(__file__) @@ -71,10 +74,11 @@ # |version| and |release|, also used in various other places throughout the # built documents. # +CUCIM_VERSION = Version(cucim.__version__) # The short X.Y version. -version = "24.04" +version = f"{CUCIM_VERSION.major:02}.{CUCIM_VERSION.minor:02}" # The full version, including alpha/beta/rc tags. -release = "24.04.00" +release = f"{CUCIM_VERSION.major:02}.{CUCIM_VERSION.minor:02}.{CUCIM_VERSION.micro:02}" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.