зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1737307 - 'mach doc': Add a new option --linkcheck r=mhentges DONTBUILD
Depends on D129283 Differential Revision: https://phabricator.services.mozilla.com/D129284
This commit is contained in:
Родитель
55e4cd7d71
Коммит
5f7ee8020d
|
@ -90,6 +90,9 @@ BASE_LINK = "http://gecko-docs.mozilla.org-l1.s3-website.us-west-2.amazonaws.com
|
|||
help="Distribute the build over N processes in parallel.",
|
||||
)
|
||||
@CommandArgument("--write-url", default=None, help="Write S3 Upload URL to text file")
|
||||
@CommandArgument(
|
||||
"--linkcheck", action="store_true", help="Check if the links are still valid"
|
||||
)
|
||||
@CommandArgument("--verbose", action="store_true", help="Run Sphinx in verbose mode")
|
||||
def build_docs(
|
||||
command_context,
|
||||
|
@ -103,6 +106,7 @@ def build_docs(
|
|||
upload=False,
|
||||
jobs=None,
|
||||
write_url=None,
|
||||
linkcheck=None,
|
||||
verbose=None,
|
||||
):
|
||||
|
||||
|
@ -152,6 +156,10 @@ def build_docs(
|
|||
"%s: could not find docs at this location" % path
|
||||
)
|
||||
|
||||
if linkcheck:
|
||||
# We want to verify if the links are valid or not
|
||||
fmt = "linkcheck"
|
||||
|
||||
result = _run_sphinx(docdir, savedir, fmt=fmt, jobs=jobs, verbose=verbose)
|
||||
if result != 0:
|
||||
print(_dump_sphinx_backtrace())
|
||||
|
|
Загрузка…
Ссылка в новой задаче