From 1c970539e9159bbb24ea0ef4ac45c61c6a9c1dba Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 26 Apr 2021 12:14:37 +0200 Subject: [PATCH 1/4] in the doc, gets the version from cmake instead 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 0b47d0d98aa61..0cf33662e7b87 100644 --- a/doc/conf.py +++ b/doc/conf.py.in @@ -48,9 +48,13 @@ # built documents. # # The short X.Y version. -version = '3.3' +version = '@MIRALL_VERSION_MAJOR@.@MIRALL_VERSION_MINOR@' # The full version, including alpha/beta/rc tags. -release = '3.3.50' +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 0325d11cf9033..69d5e2993cc90 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 20, 21 and 22. +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 From 13a815e31c0f2b3fc90fefafa61b9d8d2429fdf7 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 3 May 2021 15:15:36 +0200 Subject: [PATCH 2/4] let the cmake build of documentation act identical to makefile cmake build of documentation is not adding the same options that plain old makefile fix incoherency Signed-off-by: Matthieu Gallien --- doc/CMakeLists.txt | 12 ++++++------ doc/conf.py.in | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d254636c9536d..c50513cb4a557 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,4 +1,9 @@ if(SPHINX_FOUND) + set(SPHINXOPTS ) + set(PAPER ) + set(PAPEROPT_a4 -D latex_paper_size=a4) + set(PAPEROPT_letter -D latex_paper_size=letter) + set(ALLSPHINXOPTS -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees ${PAPEROPT_${PAPER}} ${SPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR}) # Sphinx cache with pickled ReST documents set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") @@ -70,12 +75,7 @@ if(SPHINX_FOUND) -D html_theme=owncloud_org ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR}/org ) - add_custom_target( doc-html-com ${SPHINX_EXECUTABLE} - -q -c . -b html - -d ${SPHINX_CACHE_DIR}/html - -D html_theme=owncloud_com - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR}/com ) + add_custom_target(doc-html-com ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b html -D html_theme='nextcloud_com' ${ALLSPHINXOPTS} ${SPHINX_HTML_DIR}/com) ## Building CHM files requires HTML Help Workshop. Since it requires wine ## with special dependencies, it's impossible to write a cmake check for it. diff --git a/doc/conf.py.in b/doc/conf.py.in index 0cf33662e7b87..abcb1228ab248 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -99,7 +99,7 @@ pygments_style = 'sphinx' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_shared_assets/themes'] +html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_shared_assets/themes'] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. From 55d1278fc285236b2bf5be713020c923c2cc4879 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 3 May 2021 15:23:51 +0200 Subject: [PATCH 3/4] switch CI to cmake in order to generate documentation Signed-off-by: Matthieu Gallien --- .drone.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 51e9636e5a82e..5bc6cb4517f75 100644 --- a/.drone.yml +++ b/.drone.yml @@ -139,11 +139,27 @@ kind: pipeline name: Documentation steps: +- name: cmake + image: nextcloudci/client-5.12:client-5.12-12 + volumes: + - name: build + path: /drone/build + commands: + - cd /drone/build + - cmake -G Ninja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DSANITIZE_ADDRESS=ON ../src - name: build - image: nextcloudci/documentation:documentation-5 + image: nextcloudci/client-5.12:client-5.12-12 + volumes: + - name: build + path: /drone/build commands: - - cd doc - - make html + - cd /drone/build + - ninja doc-html-com + +volumes: +- name: build + temp: {} + trigger: branch: - master From 2ecbdb62e3a456715e39df3335006561f0e34e79 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 25 Aug 2021 19:09:45 +0200 Subject: [PATCH 4/4] use the proper images to build the doc Signed-off-by: Matthieu Gallien --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5bc6cb4517f75..7b16712d864c9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -140,7 +140,7 @@ name: Documentation steps: - name: cmake - image: nextcloudci/client-5.12:client-5.12-12 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-1 volumes: - name: build path: /drone/build @@ -148,7 +148,7 @@ steps: - cd /drone/build - cmake -G Ninja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DSANITIZE_ADDRESS=ON ../src - name: build - image: nextcloudci/client-5.12:client-5.12-12 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-1 volumes: - name: build path: /drone/build