Skip to content

Commit 9c2fcca

Browse files
committed
docs: only generate list of options if STAGPY_DOC_CONFIG
1 parent 89ea9ce commit 9c2fcca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/gen_conf_list.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Generate list of configuration options."""
22

3+
import os
34
from dataclasses import fields
45
from pathlib import Path
56
from typing import TextIO
@@ -38,4 +39,8 @@ def print_config_list(fd: TextIO) -> None:
3839
with mkdocs_gen_files.open(full_doc_path, "w") as fd:
3940
print("List of configuration options", file=fd)
4041
print("===", file=fd)
41-
print_config_list(fd)
42+
if os.environ.get("STAGPY_DOC_CONFIG") is None:
43+
print(file=fd)
44+
print("Set `STAGPY_DOC_CONFIG` environment variable to generate.", file=fd)
45+
else:
46+
print_config_list(fd)

0 commit comments

Comments
 (0)