Make FAIL_WARN a boolean

This commit is contained in:
Kovid Goyal 2022-01-23 10:12:11 +05:30
parent 78cd83845f
commit e914f0df8e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 8 additions and 4 deletions

View File

@ -88,10 +88,10 @@ jobs:
run: python test.py mypy
- name: Build man page
run: make FAIL_WARN=-W man
run: make FAIL_WARN=1 man
- name: Build HTML docs
run: make FAIL_WARN=-W html
run: make FAIL_WARN=1 html
bundle:
name: Bundle test (${{ matrix.os }})

View File

@ -1,6 +1,10 @@
# Minimal makefile for Sphinx documentation
#
ifdef FAIL_WARN
FAIL_WARN=-W
endif
# You can set these variables from the command line.
SPHINXOPTS = -n -q -j auto -T $(FAIL_WARN) $(OPTS)
SPHINXBUILD = sphinx-build

View File

@ -79,11 +79,11 @@ def run_tag(args: Any) -> None:
def run_man(args: Any) -> None:
call('make FAIL_WARN=-W man', cwd=docs_dir)
call('make FAIL_WARN=1 man', cwd=docs_dir)
def run_html(args: Any) -> None:
call('make FAIL_WARN=-W "OPTS=-D analytics_id=UA-20736318-2" dirhtml', cwd=docs_dir)
call('make FAIL_WARN=1 "OPTS=-D analytics_id=UA-20736318-2" dirhtml', cwd=docs_dir)
add_old_redirects('docs/_build/dirhtml')