Make TaskCluster build the docs like RTD
This commit is contained in:
parent
88584941bc
commit
23139b2430
21
doc/Makefile
21
doc/Makefile
@ -14,34 +14,23 @@ PIP_INSTALL ?= pip3 install --user
|
|||||||
help:
|
help:
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
.PHONY: help pip3 npm Makefile doxygen-c doxygen-java
|
.PHONY: help pip3 Makefile
|
||||||
|
|
||||||
doxygen-c:
|
|
||||||
cd ../ && doxygen doc/doxygen-c.conf
|
|
||||||
|
|
||||||
doxygen-java:
|
|
||||||
cd ../ && doxygen doc/doxygen-java.conf
|
|
||||||
|
|
||||||
doxygen-dotnet:
|
|
||||||
cd ../ && doxygen doc/doxygen-dotnet.conf
|
|
||||||
|
|
||||||
pip3:
|
pip3:
|
||||||
$(PIP_INSTALL) -r ../taskcluster/docs-requirements.txt
|
$(PIP_INSTALL) -r ../taskcluster/docs-requirements.txt
|
||||||
|
|
||||||
npm:
|
|
||||||
npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x
|
|
||||||
|
|
||||||
submodule:
|
submodule:
|
||||||
git submodule update --init --remote
|
git submodule update --init --remote
|
||||||
|
|
||||||
# Add submodule update dependency to Sphinx's "html" target
|
# Add submodule update dependency to Sphinx's "html" target
|
||||||
html: Makefile submodule pip3 npm doxygen-c doxygen-java doxygen-dotnet
|
html: Makefile submodule pip3
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@PATH=$$HOME/.local/bin:`pwd`/../node_modules/.bin/:$$PATH \
|
||||||
|
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
dist: html
|
dist: html
|
||||||
cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip *
|
cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip *
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile pip3 npm doxygen-c doxygen-java doxygen-dotnet
|
%: Makefile pip3
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
13
doc/conf.py
13
doc/conf.py
@ -26,13 +26,14 @@ sys.path.insert(0, os.path.abspath('../'))
|
|||||||
|
|
||||||
autodoc_mock_imports = ['deepspeech']
|
autodoc_mock_imports = ['deepspeech']
|
||||||
|
|
||||||
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
|
# This is in fact only relevant on ReadTheDocs, but we want to run the same way
|
||||||
if read_the_docs_build:
|
# on our CI as in RTD to avoid regressions on RTD that we would not catch on
|
||||||
|
# TaskCluster
|
||||||
import subprocess
|
import subprocess
|
||||||
subprocess.call('cd ../ && npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x', shell=True)
|
subprocess.check_call('cd ../ && npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x', shell=True)
|
||||||
subprocess.call('cd ../ && doxygen doc/doxygen-c.conf', shell=True)
|
subprocess.check_call('cd ../ && doxygen doc/doxygen-c.conf', shell=True)
|
||||||
subprocess.call('cd ../ && doxygen doc/doxygen-java.conf', shell=True)
|
subprocess.check_call('cd ../ && doxygen doc/doxygen-java.conf', shell=True)
|
||||||
subprocess.call('cd ../ && doxygen doc/doxygen-dotnet.conf', shell=True)
|
subprocess.check_call('cd ../ && doxygen doc/doxygen-dotnet.conf', shell=True)
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
@ -5,6 +5,5 @@ set -xe
|
|||||||
THIS=$(dirname "$0")
|
THIS=$(dirname "$0")
|
||||||
|
|
||||||
pushd ${THIS}/../
|
pushd ${THIS}/../
|
||||||
export PATH=$HOME/.local/bin:${THIS}/../doc/node_modules/.bin/:$PATH
|
|
||||||
make -C doc/ dist
|
make -C doc/ dist
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user