From e914f0df8e933c461eeb0c8075f21aed86667933 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 23 Jan 2022 10:12:11 +0530 Subject: [PATCH] Make FAIL_WARN a boolean --- .github/workflows/ci.yml | 4 ++-- docs/Makefile | 4 ++++ publish.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2043f133f..9fc9a1812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }}) diff --git a/docs/Makefile b/docs/Makefile index 6455cbb5e..4ec575b13 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 diff --git a/publish.py b/publish.py index c77f95104..79af31a8f 100755 --- a/publish.py +++ b/publish.py @@ -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')