зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1395752
- Define and use sparse profile for Sphinx docs; r=dustin
The Sphinx documentation only needs access to a relatively small number of files in the repo in order to be generated. It is a good candidate for using sparse profiles. This commit defines and uses a "sphinx-docs" sparse profile containing only the files relevant to Sphinx documentation generation. There are some quirks with the profile: * All moz.build files are included. This bloats the profile by >1000 files. Worse, it realizes directories that have no business being realized. This clutters the checkout and makes it harder to find things. There is a moz.build reader that knows how to retrive file data from Mercurial. We could use that. This feels like follow-up fodder. * All mach_commands.py files are included. `mach help` says you can do things that you aren't able to do in the sparse checkout. There isn't a good way to add all *.py files while excluding mach_commands.py files. We /could/ do it with regular expressions. But those are slow. Let's leave it as is for now and come up with a better solution later. MozReview-Commit-ID: 7yiqGGE1nAh --HG-- extra : rebase_source : c148040ea3618e8bfdd369b6f48fc60c6d179285 extra : source : b76e2f6204b20de137f2566dff8121ff3abe5760
This commit is contained in:
Родитель
dd24896f66
Коммит
7be30dd863
|
@ -0,0 +1,17 @@
|
|||
%include build/sparse-profiles/mach
|
||||
|
||||
[include]
|
||||
# Code for generating docs.
|
||||
glob:tools/docs/**
|
||||
|
||||
# Potential docs sources
|
||||
glob:**/*.rst
|
||||
|
||||
# Python API docs.
|
||||
glob:**/*.py
|
||||
|
||||
# moz.build files are read to discover location of docs.
|
||||
glob:**/moz.build
|
||||
|
||||
# Read to set the version of the docs.
|
||||
path:config/milestone.txt
|
|
@ -18,6 +18,7 @@ doc-generate:
|
|||
command: >
|
||||
cd /builds/worker/checkouts/gecko &&
|
||||
./mach doc --outdir docs-out --no-open --archive
|
||||
sparse-profile: sphinx-docs
|
||||
when:
|
||||
files-changed:
|
||||
- '**/*.py'
|
||||
|
@ -40,6 +41,7 @@ doc-upload:
|
|||
run:
|
||||
using: run-task
|
||||
command: cd /builds/worker/checkouts/gecko && ./mach doc --upload --no-open
|
||||
sparse-profile: sphinx-docs
|
||||
scopes:
|
||||
- secrets:get:project/releng/gecko/build/level-{level}/gecko-docs-upload
|
||||
when:
|
||||
|
|
Загрузка…
Ссылка в новой задаче