forked from mirrors/gecko-dev
Bug 1812560 - Accept all directories containing an index file for 'mach doc' r=firefox-source-docs-reviewers,ahal DONTBUILD
The presence of an index file is a better criterion than the name of the directory. Differential Revision: https://phabricator.services.mozilla.com/D169094
This commit is contained in:
parent
1a578e35ae
commit
f2ae383672
1 changed files with 5 additions and 4 deletions
|
|
@ -398,13 +398,14 @@ def _find_doc_dir(path):
|
|||
return
|
||||
|
||||
valid_doc_dirs = ("doc", "docs")
|
||||
if os.path.basename(path) in valid_doc_dirs:
|
||||
return path
|
||||
|
||||
for d in valid_doc_dirs:
|
||||
p = os.path.join(path, d)
|
||||
if os.path.isdir(p):
|
||||
return p
|
||||
path = p
|
||||
|
||||
for index_file in ["index.rst", "index.md"]:
|
||||
if os.path.exists(os.path.join(path, index_file)):
|
||||
return path
|
||||
|
||||
|
||||
def _s3_upload(root, project, unique_id, version=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue