Skip to content

Commit 28d2e5b

Browse files
committed
Review comments
1 parent c155fd4 commit 28d2e5b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

run.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,13 +602,19 @@ def build_docs(
602602
create_root_redirect(build_output)
603603
elif target == 'html' and not local and not has_version_tags:
604604
logging.warning(
605-
'No version tags found in the repository. '
605+
'No version tags starting with \'v\' found in the repository. '
606606
'Falling back to a single-version documentation build.'
607607
)
608608
_run_sphinx_build(target)
609609
else:
610610
if target == 'html' and not skip_switcher:
611-
generate_switcher(include_current=include_current)
611+
if has_version_tags:
612+
generate_switcher(include_current=include_current)
613+
else:
614+
logging.warning(
615+
'No version tags starting with \'v\' found in the repository. '
616+
'Skipping switcher.json generation.'
617+
)
612618
_run_sphinx_build(target)
613619
logging.info('Sphinx documentation built successfully.')
614620
except Exception as err:

0 commit comments

Comments
 (0)