api-site/tools/build-index.sh
Andreas Jaeger bb8b09bd7a Drop DocBook support, swagger building
We do not need to build and publish the DocBook XML content anymore,
everything is frozen and in the process of moving to projects. Remove
set up for building of DocBook content.

This leaves the XML files still in tree, we can remove them later.

The DocBook XML gates are still setup, so some tox environments have
been made a noop.

Require openstack-doc-tools 1.0.0 which removes DocBook XML support.

Also, drop swagger building, this is not needed anymore.

Change-Id: I276953013a518a09dabb89bb8f80ef7739b4491b
2016-08-23 13:20:09 +02:00

47 lines
1.6 KiB
Bash
Executable File

#!/bin/bash -xe
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
PUBLISH=$1
if [[ -z "$PUBLISH" ]] ; then
echo "usage $0 (build|publish)"
exit 1
fi
mkdir -p publish-docs
# Build the www pages so that openstack-doc-test creates a link to
# www/www-index.html.
if [ "$PUBLISH" = "build" ] ; then
python tools/www-generator.py --source-directory www/ \
--output-directory publish-docs/www/
rsync -a www/static/ publish-docs/www/
# publish-docs/www-index.html is the trigger for openstack-doc-test
# to include the file.
mv publish-docs/www/www-index.html publish-docs/www-index.html
# Create index page for viewing
openstack-indexpage publish-docs
fi
if [ "$PUBLISH" = "publish" ] ; then
# Publication happens from publish-docs/api-ref to
# developer.openstack.org, so move content around
mkdir -p publish-docs/api-ref/
python tools/www-generator.py --source-directory www/ \
--output-directory publish-docs/api-ref/
rsync -a www/static/ publish-docs/api-ref/
# Don't publish this file
rm publish-docs/api-ref/www-index.html
fi