Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in the doc, gets substitution variables from cmake instead of hard coded value #3210

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,27 @@ kind: pipeline
name: Documentation

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-1
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: ghcr.io/nextcloud/continuous-integration-client:client-5.15-1
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
Expand Down
14 changes: 7 additions & 7 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -16,7 +21,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...")
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 7 additions & 3 deletions doc/conf.py → doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -95,7 +99,7 @@
#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.
Expand Down
2 changes: 1 addition & 1 deletion doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down