make the test script smarter about its output directory
If we ran "tox -e publishdocs" locally, there won't be a publish-docs/www/ directory and we don't want to create one when the template test script is run. Have it check the existing directories to derive where it should write its output. Change-Id: I4ee8495bc0fb8c6a59424332d498956ea7e7e870 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
f0f66ebd28
commit
32a20ae990
@ -1,10 +1,16 @@
|
|||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
|
if [[ -d publish-docs/www/ ]]; then
|
||||||
|
output=publish-docs/www
|
||||||
|
else
|
||||||
|
output=publish-docs/
|
||||||
|
fi
|
||||||
|
|
||||||
.tox/checkbuild/bin/python tools/www-generator.py --verbose --source-directory www/ \
|
.tox/checkbuild/bin/python tools/www-generator.py --verbose --source-directory www/ \
|
||||||
--output-directory publish-docs/www/ $@
|
--output-directory $output $@
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
rsync -a www/static/ publish-docs/www/
|
rsync -a www/static/ $output
|
||||||
fi
|
fi
|
||||||
# publish-docs/www-index.html is the trigger for openstack-indexpage
|
# publish-docs/www-index.html is the trigger for openstack-indexpage
|
||||||
# to include the file.
|
# to include the file.
|
||||||
|
Loading…
Reference in New Issue
Block a user