From e9fa3c355f8840d5310c9f409ab082bb7a37ba04 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 19 Mar 2019 17:16:49 +0100 Subject: [PATCH] Add script to build all docs --- bin/build-docs.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/build-docs.sh diff --git a/bin/build-docs.sh b/bin/build-docs.sh new file mode 100755 index 000000000..fab358912 --- /dev/null +++ b/bin/build-docs.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Build all docs with one command +# Documentation will be placed in `build/docs`. + +set -e + +CRATE_NAME=glean_core + +pushd docs && + mdbook build && + popd + +cargo doc --no-deps + +rm -rf build/docs +mkdir -p build/docs +echo '' > build/docs/index.html + +mkdir -p build/docs/book +cp -a docs/book/. build/docs/book + +mkdir -p build/docs/docs +cp -a target/doc/. build/docs/docs +printf '\n' "$CRATE_NAME" > build/docs/docs/index.html