forked from infra/otc-metadata
Update tox template
This commit is contained in:
parent
7eff19f3cd
commit
84baf725f2
@ -104,6 +104,9 @@ html_title = "{{ title }}"
|
|||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
# Do not include sources into the rendered results
|
||||||
|
html_copy_source = False
|
||||||
|
|
||||||
# -- Options for PDF output --------------------------------------------------
|
# -- Options for PDF output --------------------------------------------------
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
{%- if pdf_name is defined %}
|
{%- if pdf_name is defined %}
|
||||||
|
@ -21,8 +21,14 @@ deps =
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
# This env is invoked in the periodic pipeline and is therefore responsible to
|
||||||
|
# build all relevant docs at once.
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
|
allowlist_externals =
|
||||||
|
mkdir
|
||||||
|
cp
|
||||||
|
sh
|
||||||
commands =
|
commands =
|
||||||
{%- for doc in docs %}
|
{%- for doc in docs %}
|
||||||
{[testenv:{{ doc.type }}]commands}
|
{[testenv:{{ doc.type }}]commands}
|
||||||
@ -32,7 +38,11 @@ commands =
|
|||||||
[testenv:docs-pdf]
|
[testenv:docs-pdf]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
|
rm
|
||||||
mkdir
|
mkdir
|
||||||
|
make
|
||||||
|
bash
|
||||||
|
cp
|
||||||
commands =
|
commands =
|
||||||
mkdir -p doc/build/pdf
|
mkdir -p doc/build/pdf
|
||||||
{%- for doc in docs %}
|
{%- for doc in docs %}
|
||||||
@ -68,11 +78,12 @@ deps = -r{toxinidir}/doc/requirements.txt
|
|||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
cp
|
cp
|
||||||
mkdir
|
mkdir
|
||||||
find
|
sh
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -W --keep-going -b json {{ loc }}/source doc/build/json/{{ doc.type }}
|
sphinx-build -W --keep-going -b json {{ loc }}/source doc/build/json/{{ doc.type }}
|
||||||
# Drop data useless for the search
|
# Drop data useless for the search - wrap it also with sh/xargs due to bugs
|
||||||
find doc/build/json -type d -and ( -name '_images' -or -name '_static' -or -name '_sources' ) -exec rm {:} ;
|
# in tox
|
||||||
|
sh -c "find doc/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf"
|
||||||
{%- if doc.type == 'api-ref' %}
|
{%- if doc.type == 'api-ref' %}
|
||||||
mkdir -p api-ref/build/json
|
mkdir -p api-ref/build/json
|
||||||
cp -av doc/build/json/api-ref api-ref/build/json
|
cp -av doc/build/json/api-ref api-ref/build/json
|
||||||
|
@ -201,7 +201,7 @@ def process_repositories(args, service):
|
|||||||
repo_to.git.push(*push_args)
|
repo_to.git.push(*push_args)
|
||||||
if "github" in url_to:
|
if "github" in url_to:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
args=["gh", "pr", "create", "-f"], cwd=copy_to, check=True
|
args=["gh", "pr", "create", "-f"], cwd=copy_to, check=False
|
||||||
)
|
)
|
||||||
elif "gitea" in url_to and args.token:
|
elif "gitea" in url_to and args.token:
|
||||||
open_pr(
|
open_pr(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user