Skip to content

Commit bb90d1c

Browse files
committed
Add nox task to build multiversion documentation
1 parent 7a4d9cc commit bb90d1c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

exasol/toolbox/nox/_documentation.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ def _build_docs(session: nox.Session, config: Config) -> None:
2626
)
2727

2828

29+
def _build_multiversion_docs(session: nox.Session, config: Config) -> None:
30+
session.run(
31+
"poetry",
32+
"run",
33+
"sphinx-multiversion",
34+
f"{config.doc}",
35+
DOCS_OUTPUT_DIR,
36+
)
37+
38+
39+
@nox.session(name="docs:multiversion", python=False)
40+
def build_docs(session: Session) -> None:
41+
"""Builds the project documentation"""
42+
_build_multiversion_docs(session, PROJECT_CONFIG)
43+
44+
2945
@nox.session(name="build-docs", python=False)
3046
def build_docs(session: Session) -> None:
3147
"""Builds the project documentation"""
@@ -37,7 +53,8 @@ def open_docs(session: Session) -> None:
3753
"""Opens the built project documentation"""
3854
docs_folder = PROJECT_CONFIG.root / DOCS_OUTPUT_DIR
3955
if not docs_folder.exists():
40-
session.error(f"No documentation could be found. {docs_folder} is missing")
56+
session.error(
57+
f"No documentation could be found. {docs_folder} is missing")
4158
index = docs_folder / "index.html"
4259
webbrowser.open_new_tab(index.as_uri())
4360

0 commit comments

Comments
 (0)