mirror of https://github.com/rwf2/Rocket.git
Version API docs.
This commit is contained in:
parent
4623720d8b
commit
9296f91c12
|
@ -23,6 +23,8 @@ function relative() {
|
|||
fi
|
||||
}
|
||||
|
||||
ROCKET_VERSION="0.3.17"
|
||||
|
||||
ROOT_DIR=$(relative "") || exit $?
|
||||
EXAMPLES_DIR=$(relative "examples") || exit $?
|
||||
LIB_DIR=$(relative "lib") || exit $?
|
||||
|
|
|
@ -9,22 +9,16 @@ set -e
|
|||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source "${SCRIPT_DIR}/config.sh"
|
||||
|
||||
function mk_doc() {
|
||||
local dir=$1
|
||||
local flag=$2
|
||||
pushd "${dir}" > /dev/null 2>&1
|
||||
echo ":: Documenting '${dir}'..."
|
||||
cargo doc --no-deps --all-features
|
||||
popd > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# We need to clean-up beforehand so we don't get all of the dependencies.
|
||||
cargo clean
|
||||
cargo update
|
||||
|
||||
mk_doc "${LIB_DIR}"
|
||||
mk_doc "${CODEGEN_DIR}"
|
||||
mk_doc "${CONTRIB_DIR}"
|
||||
# Generate the rustdocs for all of the crates.
|
||||
echo ":::: Generating the docs..."
|
||||
pushd "${PROJECT_ROOT}" > /dev/null 2>&1
|
||||
RUSTDOCFLAGS="-Z unstable-options --crate-version ${ROCKET_VERSION}" \
|
||||
cargo doc -p rocket -p rocket_contrib -p rocket_codegen --no-deps --all-features
|
||||
popd > /dev/null 2>&1
|
||||
|
||||
# Blank index, for redirection.
|
||||
touch "${DOC_DIR}/index.html"
|
||||
|
|
Loading…
Reference in New Issue