You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.5 KiB

[tox]
minversion = 3.1.1
envlist = publishdocs
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
mkdir
rm
rsync
bash
[testenv:venv]
commands = {posargs}
[doc8]
# Settings for doc8:
# File extensions to use
extension = .rst,.txt
ignore-path = doc/upstream-training/build/*,doc/training-guides/build/*
[testenv:generatepot-training]
# Generate POT files for translation
commands =
rm -f doc/upstream-training/source/locale/upstream-training.pot
sphinx-build -b gettext doc/upstream-training/source/slides \
doc/upstream-training/source/locale/
sphinx-build -b gettext doc/upstream-training/source/website \
doc/upstream-training/source/locale/
bash -c "msgcat --use-first --sort-by-file doc/upstream-training/source/locale/*.pot | \
awk '$0 !~ /^\# [a-z0-9]+$/' > doc/upstream-training/source/upstream-training.pot && \
rm doc/upstream-training/source/locale/*.pot && \
rm -rf doc/upstream-training/source/locale/.doctrees/ && \
mv doc/upstream-training/source/upstream-training.pot doc/upstream-training/source/locale/upstream-training.pot"
[testenv:publishdocs]
# These are needed for writing the root-marker
passenv = ZUUL*
commands =
{[testenv:upstream-slides]commands}
# Publish
mkdir -p publish-docs/html/upstream-training
rsync -av doc/upstream-training/build/slides/ publish-docs/html/upstream-training/
{toxinidir}/tools/add-marker.sh publish-docs/html/upstream-training
# Publish translated guides
{toxinidir}/tools/buildlang.sh
[testenv:upstream-slides]
commands =
# Niceness test
doc8 doc/upstream-training
# Build upstream-training slides
sphinx-build -W -b slides -d doc/upstream-training/build/slides.doctrees doc/upstream-training/source/slides doc/upstream-training/build/slides
# Build upstream landing page index.html
sphinx-build -W -b html -d doc/upstream-training/build/slides.doctrees doc/upstream-training/source/website doc/upstream-training/build/slides
[testenv:training-slides]
commands =
# Niceness test
doc8 doc/training-guides
# Build training-guides slides
sphinx-build -W -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/source/slides doc/training-guides/build/slides/associate-guide
# Build training-guides landing page index.html
sphinx-build -b html -d doc/training-guides/build/slides.doctrees doc/training-guides/source/website doc/training-guides/build/slides