From bd2aa8bd0d2314667c27cd82fd95ef9c67bd5a64 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 26 Apr 2021 12:14:37 +0200 Subject: [PATCH] in the doc, gets the version from cmake instaed of hard coded value Signed-off-by: Matthieu Gallien --- doc/CMakeLists.txt | 2 +- doc/{conf.py => conf.py.in} | 8 ++++++-- doc/installing.rst | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) rename doc/{conf.py => conf.py.in} (96%) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 4e9b6386b4ee9..d254636c9536d 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -16,7 +16,7 @@ if(SPHINX_FOUND) install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py" conf.py COPYONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in conf.py) if(WITH_DOC) add_custom_target(doc ALL DEPENDS doc-html COMMENT "Building documentation...") diff --git a/doc/conf.py b/doc/conf.py.in similarity index 96% rename from doc/conf.py rename to doc/conf.py.in index 6cd2a4d7c710a..0cf33662e7b87 100644 --- a/doc/conf.py +++ b/doc/conf.py.in @@ -48,9 +48,13 @@ # built documents. # # The short X.Y version. -version = '3.2' +version = '@MIRALL_VERSION_MAJOR@.@MIRALL_VERSION_MINOR@' # The full version, including alpha/beta/rc tags. -release = '3.2.1' +release = '@MIRALL_VERSION@' +# The minimum and maximum server major supported version +rst_prolog = """ +.. |minimum_server_version| replace:: @NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_MAJOR@ +.. |maximum_server_version| replace:: """ + str(@NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_MAJOR@ + 2) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/installing.rst b/doc/installing.rst index dbfadeb09c5bc..139e2c7fdd21a 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -8,7 +8,7 @@ There are clients for Linux, macOs, and Microsoft Windows. The currently supported server releases are the latest three stable versions at time of publication. It means that the |version| release series is supporting -server major version 19, 20 and 21. +server major versions |minimum_server_version| up to |maximum_server_version|. Installation on Mac OS X and Windows is the same as for any software application: download the program and then double-click it to launch the