mirror of https://gitee.com/bigwinds/arangodb
enable scripts to force a gitbook version that is currently already installed, so it doesn't fetch stuff from the 'net. (#2803)
This commit is contained in:
parent
4c6ede7395
commit
17a8049e50
|
@ -432,7 +432,7 @@ function build-book()
|
|||
(cd "ppbooks/${NAME}"; gitbook install -g)
|
||||
fi
|
||||
echo "${STD_COLOR} - Building Book ${NAME} ${RESET}"
|
||||
(cd "ppbooks/${NAME}" && gitbook build "./" "./../../books/${NAME}")
|
||||
(cd "ppbooks/${NAME}" && gitbook ${GITBOOK_ARGS} build "./" "./../../books/${NAME}")
|
||||
rm -f "./books/${NAME}/HEADER.html"
|
||||
rm -f "./books/${NAME}/FOOTER.html"
|
||||
echo "${STD_COLOR} - deleting markdown files in output (gitbook 3.x bug)"
|
||||
|
@ -450,7 +450,7 @@ function build-book-dist()
|
|||
cd "ppbooks/${NAME}"
|
||||
for ext in ${OTHER_MIME}; do
|
||||
OUTPUT="${OUTPUT_DIR}/ArangoDB_${NAME}_${newVersionNumber}.${ext}"
|
||||
if gitbook "${ext}" ./ "${OUTPUT}"; then
|
||||
if gitbook ${GITBOOK_ARGS} "${ext}" ./ "${OUTPUT}"; then
|
||||
echo "success building ${OUTPUT}"
|
||||
else
|
||||
exit 1
|
||||
|
|
|
@ -51,6 +51,10 @@ test_tools(){
|
|||
echo "the latest version."
|
||||
exit 1
|
||||
fi
|
||||
if test $(whoami) != "root"; then
|
||||
cp -a /root/.gitbook/ ~/
|
||||
cp -a /root/.npm/ ~/
|
||||
fi
|
||||
}
|
||||
|
||||
main(){
|
||||
|
@ -76,6 +80,13 @@ main(){
|
|||
fi
|
||||
./utils/generateSwagger.sh
|
||||
|
||||
INSTALLED_GITBOOK_VERSION=$(gitbook ls |grep '*'|sed "s;.*\* ;;")
|
||||
if test -z "${INSTALLED_GITBOOK_VERSION}"; then
|
||||
echo "your container doesn't come with a preloaded version of gitbook, please update it."
|
||||
exit 1
|
||||
fi
|
||||
export GITBOOK_ARGS="--gitbook ${INSTALLED_GITBOOK_VERSION}"
|
||||
|
||||
cd Documentation/Books
|
||||
|
||||
if test -z "$TARGET"; then
|
||||
|
|
Loading…
Reference in New Issue