diff --git a/Makefile b/Makefile index 826624e3..39d8939d 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ executable: clean pyinstaller ytdl-sub.spec mv dist/ytdl-sub dist/ytdl-sub${EXEC_SUFFIX} docs: + REGENERATE_DOCS=1 pytest tests/unit/docgen/test_docgen.py sphinx-build -M html docs/source/ docs/build/ clean: rm -rf \ diff --git a/tools/docgen/docgen.py b/tools/docgen/docgen.py index f1307b29..a021e7ae 100644 --- a/tools/docgen/docgen.py +++ b/tools/docgen/docgen.py @@ -1,7 +1,8 @@ +import os from abc import abstractmethod from pathlib import Path -REGENERATE_DOCS: bool = False +REGENERATE_DOCS: bool = bool(os.environ.get("REGENERATE_DOCS", 0)) class DocGen: