diff --git a/tools/generatelabs b/tools/generatelabs new file mode 100755 index 00000000..eb69b723 --- /dev/null +++ b/tools/generatelabs @@ -0,0 +1,10 @@ +#!/bin/bash +# Used by tox.ini when checking build and publishing docs to website + +# Create tarball of labs scripts for Linux/OS X users +bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" + +# Generate Windows batch scripts +bash -c "labs/osbash.sh -w cluster" +# Create zip file of labs scripts for Windows users +bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" diff --git a/tox.ini b/tox.ini index 81bf65f5..20f707d6 100644 --- a/tox.ini +++ b/tox.ini @@ -37,9 +37,8 @@ commands = openstack-doc-test --check-deletions {posargs} commands = mkdir -p publish-docs/trunk/training-guides openstack-doc-test --check-build {posargs} - bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" - bash -c "labs/osbash.sh -w cluster" - bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" + # Build labs scripts + bash {toxinidir}/tools/generatelabs [testenv:publishdocs] # Prepare all documents (except www subdir) so that they can get @@ -51,9 +50,8 @@ commands = mkdir -p publish-docs/trunk/training-guides # We only publish changed manuals. openstack-doc-test --check-build --publish - bash -c "tar czf publish-docs/trunk/training-guides/labs-scripts.tgz labs" - bash -c "labs/osbash.sh -w cluster" - bash -c "zip -r publish-docs/trunk/training-guides/labs-scripts.zip labs" + # Build and publish training labs scripts + bash {toxinidir}/tools/generatelabs [testenv:checklang] # Generatedocbook needs xml2po which cannot be installed