Граф коммитов

89 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt ecf5614a49 Bug 1484691 - [doc] Don't add doctrees nested under other doctrees to the root index r=nalexander
Currently, it's possible to nest doctrees underneath one another by doing this:

    SPHINX_TREES['foo'] = 'docs'
    SPHINX_TREES['foo/bar'] = 'bar/docs'

(note: the 'bar' doctree doesn't need to be a subdir of foo and can be defined
in a completely separate moz.build)

Doing this means that the docs in 'bar' will be nested underneath the docs in
'foo' when sphinx-build ultimately runs.

This allows us to add 'bar' to foo's index, essentially making bar a subdoc of
foo.  The problem is that we also add bar's docs to the root index here:
https://searchfox.org/mozilla-central/rev/dac799c9f4e9f5f05c1071cba94f2522aa31f7eb/tools/docs/moztreedocs/__init__.py#133

The result is that the main landing page for firefox-source-docs is a big long
list of random unrelated topics. There is no organization or cohesion. By
excluding subdocs from the main index, we can start to move pages around into
some kind of organization that makes sense.

Actually moving those docs will be a lot of work, but at least this will give
us the ability.

Differential Revision: https://phabricator.services.mozilla.com/D16869

--HG--
extra : moz-landing-system : lando
2019-01-18 20:10:18 +00:00
Mike Cooper 59081613bd Bug 1479127 - Add featuregate library r=mossop,firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D5175

--HG--
extra : moz-landing-system : lando
2019-01-09 20:01:52 +00:00
Brindusan Cristian 52ff39744a Backed out changeset 7e107869b00d (bug 1479127) for bc failures on browser_all_files_referenced.js. 2019-01-09 21:20:01 +02:00
Mike Cooper a719a1c3f2 Bug 1479127 - Add featuregate library r=mossop,firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D5175

--HG--
extra : moz-landing-system : lando
2019-01-09 16:15:59 +00:00
Andrew Halberstadt b765d8e8aa Bug 1517238 - [docs] Fix AttributeError: 'module' object has no attribute 'DirEntry' when running |mach doc|, r=davehunt
This was happening because one of the modules sphinx generates apidocs for
started depending on scandir and our in-tree vendored copy of scandir doesn't
have the C module built. I'm still not sure why this is failing though (scandir
is supposed to fall-back to ctypes if the C module doesn't exist).

Either way, adding scandir to tools/docs/Pipfile works around the problem.

Differential Revision: https://phabricator.services.mozilla.com/D15571

--HG--
extra : moz-landing-system : lando
2019-01-02 15:31:26 +00:00
Andrew Halberstadt dbf1f2b689 Bug 1474746 - [docs] Normalize keys from MOZ_SPHINX_TREES; r=gps
This will allow developers to use '.' as the key, e.g:
MOZ_SPHINX_TREES['.'] = 'docs'

This will give consumers the ability to remove redundancies from
their urls. For example, the telemetry docs currently have:
MOZ_SPHINX_TREES['telemetry'] = 'docs'

This results in a url like:
https://firefox-source-docs.mozilla.org/main/latest/toolkit/components/telemetry/telemetry/index.html

If they changed their key to '.' instead, the new url would become:
https://firefox-source-docs.mozilla.org/main/latest/toolkit/components/telemetry/index.html

Depends on D2079.

Differential Revision: https://phabricator.services.mozilla.com/D2080

--HG--
extra : histedit_source : b34a35d2686553e615c7fc8c48422ee9e7d29179
2018-07-11 16:01:21 +00:00
Andrew Halberstadt b9e99b1dce Bug 1474746 - [docs] Fix firefox-source-docs url regression by removing redundant "docs" directory; r=gps
This fixes a regression from bug 1454640 where urls had an extra 'docs' path inserted into them, e.g:
toolkit/components/telemetry/telemetry/index.html

became:
toolkit/components/telemetry/docs/telemetry/index.html

Differential Revision: https://phabricator.services.mozilla.com/D2079

--HG--
extra : histedit_source : 15c679e2f9366c1ea424adc4c82d7c184d80b3bb
2018-07-11 14:52:33 +00:00
Andrew Halberstadt bf87aca534 Bug 1437526 - [docs] Upgrade doc dependencies to their latest versions, r=davehunt
This upgrades sphinx to version 1.7.5, which contained a couple backwards
incompatible changes that needed fixing.

This also leaves sphinx-js at version 2.1 as upgrading that to 2.5 seems to
introduce an intermittent in the Doc task.

MozReview-Commit-ID: FRUTcXs5yzb

--HG--
extra : rebase_source : e874a2e9c637b7cec710203f75f4dd989a5681a1
2018-06-01 10:19:01 -04:00
Tom Prince 09e6aba6a8 No bug: [source-docs] Log the file being uploaded; r=gps
Differential Revision: https://phabricator.services.mozilla.com/D1479
2018-06-01 18:13:08 +00:00
Andrew Halberstadt 5051175261 Bug 1458461 - [docs] Use pipenv to manage |mach doc| python environment, r=davehunt
MozReview-Commit-ID: HOEnaoIy9dD

--HG--
extra : rebase_source : 2436c9d0bb51944c20ec1a69a3d345ef225a2856
2018-05-30 14:57:58 -04:00
Andrew Halberstadt bdde91f155 Bug 1464327 - [docs] Fix doc uploading by removing trailing comma, r=gps
This was changing the project from "main" -> ("main",) which was causing the DocUp
task to upload to urls like:
"('main',)/62.0/_sources/..."

MozReview-Commit-ID: 1bL9nqiAEFE

--HG--
extra : rebase_source : 8f4148dd003dfcfb4c0ba513e4fa7e2ca540dce3
2018-05-28 08:44:08 -04:00
Andrew Halberstadt 61b8f2b36a Bug 1454640 - [docs] Lazy load the package and version properties r=mshal on a CLOSED TREE
We no longer store the docs under a project name (since all the docs are now
built using the root conf.py). This mean the name and version are only used for
packaging and uploading, which typically is only used in CI.

This allows us to lazy load the package name and version, so we only read the
conf.py when we need to.

MozReview-Commit-ID: DV5Jxrbskoh

--HG--
extra : source : d03f75986f626938142bd5bde293773506a2fc14
extra : amend_source : d6d0ff5673515cac3a6c7cf03bfce4ffcd09991f
2018-04-18 17:31:10 -04:00
Andrew Halberstadt fe81229ade Bug 1454640 - [docs] Always build docs with the tools/docs/conf.py r=mshal
Previously, running |mach doc <subtree>| would use whatever conf.py file
happened to live in the subtree. For example, running:

./mach doc tools/lint

Would build with tools/lint/docs/conf.py. This is bad because it means the
generated docs will look different from the docs that eventually will be
published to firefox-source-docs.mozilla.com.

This patch makes sure we always use tools/docs/conf.py for building, even when
only generating a subtree.

Furthermore, this sets things up such that when you modify a file, only the
subtree containing the modified file will be re-generated.  This cuts down
rebuild times from ~2 minutes to ~20 seconds.

There is one caveat. When rebuilding a subtree, the index of other trees will
be overwritten in that particular subtree. I couldn't figure out anyway around
this. This tradeoff for *much* faster rebuild times seems worth it.

MozReview-Commit-ID: Ly88mvHKpo7

--HG--
extra : source : 47fc3e2238676a40a3adc84239baed1ce873e95e
2018-04-18 17:18:11 -04:00
Andrew Halberstadt 11734ea63e Bug 1454640 - [mozbuild] Ability to find sphinx variables relevant to a given path r=mshal
The current mechanism for reading SPHINX variables assumes we always want to
read metadata for the entire tree. Now that we have the ability to rebuild
specific subtrees, this assumption is false.

This patch allows us to specify a path that find_sphinx_variables can use to
filter down the set of moz.build variables it will traverse, yielding only
moz.builds that could potentially impact the specified path.

MozReview-Commit-ID: ALrCFLFgMLH

--HG--
extra : source : 22f2dc60e6d859d3ca411826c77002d87c1a49bd
2018-04-17 11:51:37 -04:00
Andrew Halberstadt a33ec550e5 Bug 1454640 - [docs] Memoize the result of processing sphinx moz.build variables r=mshal
Now that we can rebuild docs with the liveserver, there are some optimizations
we should make. One of those is processing the sphinx moz.build variables. This
patch makes sure we don't re-process moz.build if we've already done so in a
previous rebuild.

MozReview-Commit-ID: 2AIr1KeAPQV

--HG--
extra : source : 30b4083534b51213a1b9fe0d86f996cfa0e7fa54
2018-04-18 15:01:10 -04:00
Andrew Halberstadt 03da91b713 Bug 1454640 - [docs] Use a single SphinxManager instance across all rebuilds r=mshal
In the mozbuild.sphinx extension, we create a new SphinxManager instance each
time. However this isn't ideal now that we can rebuild the docs within the same
interpreter using the livereload server.

This makes use of a singleton so that we can share state not only between
multiple invocations of sphinx-build, but also with the mach command. This will
be taken advantage of more heavily in future commits in this series.

MozReview-Commit-ID: 7ERYeN5BPeI

--HG--
extra : source : 8309212d820bcca29aa95b7892d39940437f2aa8
2018-04-18 12:56:55 -04:00
Andrew Halberstadt cf57ba3bc5 Bug 1454640 - [moztreedocs] Move 'create_tarball' into a package submodule r=mshal
These two functions are typically only used by CI for packaging/uploading the
documentation. This is a minor re-organiztion for clarity.

MozReview-Commit-ID: 62UhQhSSkOs

--HG--
extra : source : 9942d2df371989c5dd67a75fd7a695533141dd89
2018-04-18 12:17:44 -04:00
Coroiu Cristina 5dfcabfb35 Backed out 6 changesets (bug 1454640) for bustage at build/src/security/manager/ssl/nsNSSComponent.cpp on a CLOSED TREE
Backed out changeset d03f75986f62 (bug 1454640)
Backed out changeset 47fc3e223867 (bug 1454640)
Backed out changeset 22f2dc60e6d8 (bug 1454640)
Backed out changeset 30b4083534b5 (bug 1454640)
Backed out changeset 8309212d820b (bug 1454640)
Backed out changeset 9942d2df3719 (bug 1454640)
2018-05-10 23:12:38 +03:00
Andrew Halberstadt 3ba7a7aa44 Bug 1454640 - [docs] Lazy load the package and version properties r=mshal
We no longer store the docs under a project name (since all the docs are now
built using the root conf.py). This mean the name and version are only used for
packaging and uploading, which typically is only used in CI.

This allows us to lazy load the package name and version, so we only read the
conf.py when we need to.

MozReview-Commit-ID: DV5Jxrbskoh

--HG--
extra : rebase_source : d227b8a800715c677602cbbc9b868df5dbd31131
2018-04-18 17:31:10 -04:00
Andrew Halberstadt 426661910a Bug 1454640 - [docs] Always build docs with the tools/docs/conf.py r=mshal
Previously, running |mach doc <subtree>| would use whatever conf.py file
happened to live in the subtree. For example, running:

./mach doc tools/lint

Would build with tools/lint/docs/conf.py. This is bad because it means the
generated docs will look different from the docs that eventually will be
published to firefox-source-docs.mozilla.com.

This patch makes sure we always use tools/docs/conf.py for building, even when
only generating a subtree.

Furthermore, this sets things up such that when you modify a file, only the
subtree containing the modified file will be re-generated.  This cuts down
rebuild times from ~2 minutes to ~20 seconds.

There is one caveat. When rebuilding a subtree, the index of other trees will
be overwritten in that particular subtree. I couldn't figure out anyway around
this. This tradeoff for *much* faster rebuild times seems worth it.

MozReview-Commit-ID: Ly88mvHKpo7

--HG--
extra : rebase_source : 379ffb482a4d15f5f6b394f93adab2b536c7ce00
2018-04-18 17:18:11 -04:00
Andrew Halberstadt cb800e2585 Bug 1454640 - [mozbuild] Ability to find sphinx variables relevant to a given path r=mshal
The current mechanism for reading SPHINX variables assumes we always want to
read metadata for the entire tree. Now that we have the ability to rebuild
specific subtrees, this assumption is false.

This patch allows us to specify a path that find_sphinx_variables can use to
filter down the set of moz.build variables it will traverse, yielding only
moz.builds that could potentially impact the specified path.

MozReview-Commit-ID: ALrCFLFgMLH

--HG--
extra : rebase_source : d0c26a006bb4dbc429be5eedad7825d4412dc2a4
2018-04-17 11:51:37 -04:00
Andrew Halberstadt 8ab3f6ec83 Bug 1454640 - [docs] Memoize the result of processing sphinx moz.build variables r=mshal
Now that we can rebuild docs with the liveserver, there are some optimizations
we should make. One of those is processing the sphinx moz.build variables. This
patch makes sure we don't re-process moz.build if we've already done so in a
previous rebuild.

MozReview-Commit-ID: 2AIr1KeAPQV

--HG--
extra : rebase_source : d8034ef5be416975c19a473d5a13f073e95aba80
2018-04-18 15:01:10 -04:00
Andrew Halberstadt 09c473ae93 Bug 1454640 - [docs] Use a single SphinxManager instance across all rebuilds r=mshal
In the mozbuild.sphinx extension, we create a new SphinxManager instance each
time. However this isn't ideal now that we can rebuild the docs within the same
interpreter using the livereload server.

This makes use of a singleton so that we can share state not only between
multiple invocations of sphinx-build, but also with the mach command. This will
be taken advantage of more heavily in future commits in this series.

MozReview-Commit-ID: 7ERYeN5BPeI

--HG--
extra : rebase_source : 44aee637ea9b828b43b82e8639ddc3cc7f68c797
2018-04-18 12:56:55 -04:00
Andrew Halberstadt b8deae6620 Bug 1454640 - [moztreedocs] Move 'create_tarball' into a package submodule r=mshal
These two functions are typically only used by CI for packaging/uploading the
documentation. This is a minor re-organiztion for clarity.

MozReview-Commit-ID: 62UhQhSSkOs

--HG--
extra : rebase_source : c5b800734041689453f965e50ce356c2e7a623d2
2018-04-18 12:17:44 -04:00
Dorel Luca 70e79e52cd Backed out 11 changesets (bug 1437593) for Doc linting failure. CLOSED TREE
Backed out changeset 0f3dbbd73ed4 (bug 1437593)
Backed out changeset 64c84cf90e8b (bug 1437593)
Backed out changeset 36c66615886f (bug 1437593)
Backed out changeset dfafbe7770ad (bug 1437593)
Backed out changeset 900f32450a74 (bug 1437593)
Backed out changeset d6fe456bb39c (bug 1437593)
Backed out changeset 4842e4b68d82 (bug 1437593)
Backed out changeset e024b3d775fd (bug 1437593)
Backed out changeset ce9e3951357a (bug 1437593)
Backed out changeset afaeac146ff8 (bug 1437593)
Backed out changeset 88954bcf6ca2 (bug 1437593)
2018-04-28 12:02:02 +03:00
Dave Hunt 3899c75e16 Bug 1437593 - Use pipenv for |mach doc| environment; r=ted
MozReview-Commit-ID: Ek2XnJRsDFI

--HG--
extra : rebase_source : 31ad2a183cf4a63fdd236aaf85a30cdda6849835
2018-03-27 13:10:05 +01:00
Gurzau Raul 677f146915 Backed out 11 changesets (bug 1437593) for SpiderMonkey failures on a CLOSED TREE
Backed out changeset e4b2357330b4 (bug 1437593)
Backed out changeset 8cb34c11ad45 (bug 1437593)
Backed out changeset ab27411c53c2 (bug 1437593)
Backed out changeset c90a0961f52a (bug 1437593)
Backed out changeset 60114a93b6b1 (bug 1437593)
Backed out changeset d12eec17c51c (bug 1437593)
Backed out changeset 2f83246cb0b1 (bug 1437593)
Backed out changeset 19b7273e375c (bug 1437593)
Backed out changeset cf026c071b73 (bug 1437593)
Backed out changeset c7fa833eff1d (bug 1437593)
Backed out changeset 828caab5032d (bug 1437593)
2018-04-27 02:20:39 +03:00
Dave Hunt e8ea830d6f Bug 1437593 - Use pipenv for |mach doc| environment; r=ted
MozReview-Commit-ID: Ek2XnJRsDFI

--HG--
extra : rebase_source : 31ad2a183cf4a63fdd236aaf85a30cdda6849835
2018-03-27 13:10:05 +01:00
Andrew Halberstadt c52efbdc58 Bug 1410424 - [docs] Support live reloading with |mach doc| r=mshal
This changes the default to opening a livereload webserver after doc generation
(as opposed to opening the index file). Any changes to the specified path will
result in a rebuild and refresh of the browser.

For example, if you run:

    ./mach doc tools/lint

The linting docs will be built, served and opened in a browser. Modifying any
file under 'tools/lint/docs' will refresh the browser with your changes.

To disable this behaviour and simply open the index file, you can pass in
'--no-serve'. The '--no-open' flag will continue to work (both with http and
the file system).

One caveat to this patch is that when generating the root docs (by running
|mach doc|), we don't watch all possible doc paths (just the root one under
'tools/docs/'). This will probably be fixed in the follow-up bug 1454640.

MozReview-Commit-ID: FQecuePM0zZ

--HG--
extra : rebase_source : 3240402d7505e99a4f64dada309b1baec78306e1
2018-04-06 10:52:56 -04:00
Andrew Halberstadt 73873ac2df Bug 1410424 - [docs] Remove ability to specify multiple doc paths at the same time r=mshal
This removes the ability to specify multiple doc paths at the same time with
|mach doc|. We will be changing the default from opening index files to serving
the documentation with a webserver. Supporting multiple doc roots would mean
spinning up multiple servers in different threads.

This would add a lot of complexity for a feature which I don't think is very
useful. It's very rare that one would need to edit more than one doc location
at the same time. And if this is ever needed, the developer can just build the
entire doctree (by running |mach doc|) or run |mach doc <path>| in multiple
different terminals.

MozReview-Commit-ID: GXEZJSgLpgF

--HG--
extra : rebase_source : 2eda23274eb6c2be82f7e77ca577072386bada34
2018-04-06 10:30:31 -04:00
Andrew Halberstadt 853598e23e Bug 1410424 - [mozbuild] Add a 'quiet' argument to VirtualenvManager.install_pip_requirements r=mshal
Some requirements.txt are very large and result in a lot of package already
installed messages. Would be nice to hide this.

MozReview-Commit-ID: FQecuePM0zZ

--HG--
extra : rebase_source : 58eaa7324775cfaa39077871be0be0ef39ad7c11
2018-04-06 10:23:49 -04:00
Kris Maglione 5f201b2222 Bug 1372406: Follow-up: Add missing source directory to docs config. r=bustage
MozReview-Commit-ID: 5fb1OBnItRS

--HG--
extra : rebase_source : 707bce15f9b5983cf3fd2ae8454a132101891b2e
2018-03-28 12:23:15 -07:00
Sylvestre Ledru a0ab39f145 Bug 1438839 - Fix the remaining flake8 issues by hand r=ahal
MozReview-Commit-ID: Fv1MZIpCL8Z

--HG--
extra : rebase_source : 804567a78a5696997e2aa511814a4f8ff22d9c31
extra : histedit_source : 88401e831d81708b6ed6122666ba9fa8c1de23d5
2018-03-15 11:34:03 +01:00
Sylvestre Ledru ef5ad1811f Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ r=ahal
MozReview-Commit-ID: KSKbctxjxl0

--HG--
extra : rebase_source : feebd58ff005750face884035f85a55e0ff638c8
extra : histedit_source : 5d7464caeb41bad25bc99d3b2e32ea5285464499
2018-03-15 11:32:42 +01:00
Andreas Tolfsen 612979856b Bug 1441019 - Add testing/marionette to js_source_path. r=gps,nalexander
MozReview-Commit-ID: Lvj7zbnzpLR

--HG--
extra : rebase_source : 84fc2f2cb09d89715cf902152798ccb8f1c14545
2018-02-22 16:32:49 +00:00
Andrew Halberstadt 033f64e234 Bug 1437484 - Pin and hash all requirements for |mach doc|, r=gps
Previously we weren't explicitly installing sphinx. Instead, the 'sphinx-js'
package had a dependency on 'sphinx<2.0'. This caused errors when sphinx
released their backwards incompatible version 1.7.

This patch pins sphinx==1.6.7 and adds all other dependencies to the same
requirements.txt (with hashes).

Upgrading to sphinx==1.7 will happen in a follow-up.

MozReview-Commit-ID: 28fKI7T4vfa

--HG--
extra : rebase_source : a9f276586ed08f49c1a26088aae88c363a31c167
2018-02-12 09:36:12 -05:00
Nick Alexander 9d65a9cea8 Bug 1435424 - Remove doxygen support from the build system. r=gps
This is ancient and the team that used it (gfx) is no longer using it.

MozReview-Commit-ID: HrDgmAU9QeW

--HG--
extra : rebase_source : c4a64965c4ae1a50888893e881a6e8a9688a58b6
2018-02-02 14:24:18 -08:00
Andrew Swan 795e20a3a6 Bug 1423425 Initial draft of WebExtensions API documentation r=bsilverberg
MozReview-Commit-ID: EwcE881XGfp

--HG--
extra : rebase_source : 70283e30375019e56c355dd61c92352b31481228
2017-12-05 18:54:34 -08:00
Andrew Swan 27e300a51e Bug 1423425 Let sphinx-js read .js files r=erik
MozReview-Commit-ID: LfL3CG6L4Ss

--HG--
extra : rebase_source : 5a53dac9891fc9233a8b380c4a52eb9154c564a9
2017-12-05 18:53:59 -08:00
Cosmin Sabou 2d8d0b4c2c Backed out 3 changesets (bug 1423425) for frequent browser chrome failures r=backout on a CLOSED TREE
Backed out changeset c3ac950b0b8a (bug 1423425)
Backed out changeset d64fd69a4b88 (bug 1423425)
Backed out changeset 04017639642a (bug 1423425)
2017-12-16 02:45:41 +02:00
Andrew Swan 8c271228b8 Bug 1423425 Initial draft of WebExtensions API documentation r=bsilverberg
MozReview-Commit-ID: EwcE881XGfp

--HG--
extra : rebase_source : 13ef6ba6ff73349c9fe5c25f16b305418b9804ff
2017-12-05 18:54:34 -08:00
Andrew Swan 02474d47f7 Bug 1423425 Let sphinx-js read .js files r=erik
MozReview-Commit-ID: LfL3CG6L4Ss

--HG--
extra : rebase_source : 5a53dac9891fc9233a8b380c4a52eb9154c564a9
2017-12-05 18:53:59 -08:00
Andrew Halberstadt 07b162ff59 Bug 1419772 - [docs] Enable the sphinx.ext.napoleon extension, r=gps
This enables sphinx to parse both the google and numpy style docstring
formats which tend to be more human readable than the default sphinx
format.

See:
http://www.sphinx-doc.org/en/stable/ext/napoleon.html

MozReview-Commit-ID: REmZ4IoUG8

--HG--
extra : rebase_source : 4e3e788d09a7fcc3d3e84bb94744019583e1ee5e
2017-11-22 10:17:12 -05:00
Tom Prince c26f79ab2a Bug 1402154: Allow specifying an absolute path to mount sphinx docs. r=gps
MozReview-Commit-ID: 8OLCtwg8zXc

--HG--
extra : rebase_source : ad2ab3272d8f326f80287b190e779366872d95fc
2017-11-20 11:56:52 -07:00
Robert Helmer 56ca69de9d Bug 1389341 - start generating jsdoc for AddonManager API r=kmag
MozReview-Commit-ID: IpREaXBIMbq

--HG--
extra : rebase_source : 83fa1b40a52f890b25bbf477bef2aaf146f77098
2017-09-14 13:18:11 -07:00
Robert Helmer 42315c18f8 Bug 1389341 - add basic support for sphinx-js to mach doc r=gps
MozReview-Commit-ID: FIzWD8tnjYi

--HG--
extra : rebase_source : 655ea46cffefda77f0908924fdbbb8d17212654a
2017-09-14 13:17:09 -07:00
Maja Frydrychowicz 1fe7490b20 Bug 1411430 - Support markdown in Sphinx docs; r=gps
MozReview-Commit-ID: IdRuC4AFarq

--HG--
extra : rebase_source : f0b6c72340920fad49ab06887cd25db436c82897
2017-10-23 09:59:31 -04:00
Gregory Szorc 3bc8ec26f0 Bug 1390693 - Use thread pool for S3 uploads; r=dustin
This reduces the time taken to upload the Firefox docs from ~30s to
~5s (per invocation).

MozReview-Commit-ID: DxOrvxvVn42

--HG--
extra : rebase_source : b170fb728267c43484573e0a57ebc96512eb0e7c
2017-08-24 12:38:01 -07:00
Gregory Szorc 10773f0d43 Bug 1390693 - Upload docs to project and version specific locations; r=dustin
Previously, we uploaded the main Firefox tree docs to /.

In reality, there are multiple Sphinx projects in the repo. In
addition, it is sometimes desirable to access docs for an older
version of Firefox.

In this commit, we add support for specifying the S3 key prefix
for uploads. Then we change the upload code to upload to multiple
locations:

* <project>/latest (always)
* <project>/<version> (if a version is defined in the Sphinx config)
* / (for the main Sphinx docs project)

For the Firefox docs, ``version`` corresponds to a sanitized value from
``milestone.txt``. Currently, it resolves to ``57.0``.

While we're here, we add support for declaring an alternate project
name in the Sphinx conf.py file. If ``moz_project_name`` is defined,
we use that as the project name. For Firefox, we set it to ``main``.
This means our paths (local and uploaded) are now ``main`` instead of
``Mozilla_Source_Tree_Docs``. That's much more pleasant.

MozReview-Commit-ID: 8Gl6l2m6uU4

--HG--
extra : rebase_source : e56885092c12eb8cc76e5e7300f938be566e3e5a
extra : intermediate-source : 8509af1e135177a93460270b27f263c10a62d996
extra : source : 71b4f32caf209fe9dffc340c0b8ccb51ac79c7de
2017-08-24 11:12:21 -07:00
Gregory Szorc 17296bc970 Bug 1390693 - Fold `mach doc-upload` into `mach doc`; r=dustin
We now have an --upload flag to control whether upload is performed.

We don't inline it because we want to maintain a "firewall" between
regular docs and all the extra packages and imports needed for S3.

MozReview-Commit-ID: DVKhsS545gp

--HG--
extra : rebase_source : 7fee832145189be882db0f0ca057eda6158e0492
2017-08-24 11:31:54 -07:00