2018-07-23 10:19:52 +02:00
|
|
|
cd docs
|
2019-02-02 12:10:56 +01:00
|
|
|
yarn -v
|
2018-12-02 08:23:43 +01:00
|
|
|
node -v
|
2018-07-23 10:19:52 +02:00
|
|
|
echo 'Installing Gitbook CLI'
|
2019-03-04 12:51:53 +01:00
|
|
|
yarn global add gitbook-cli
|
2018-07-23 10:19:52 +02:00
|
|
|
|
|
|
|
|
echo 'Running Gitbook installation'
|
2019-03-04 12:51:53 +01:00
|
|
|
|
|
|
|
|
# Generate all version's GitBook output
|
|
|
|
|
for D in *; do
|
|
|
|
|
if [ -d "${D}" ]; then
|
|
|
|
|
echo "Generating output for: ${D}"
|
|
|
|
|
cd "${D}"
|
|
|
|
|
|
|
|
|
|
# Clear previous output, generate new
|
|
|
|
|
rm -rf _book
|
|
|
|
|
gitbook install
|
|
|
|
|
gitbook build
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Move CNAME File into `latest`
|
|
|
|
|
cp CNAME ./latest/CNAME
|
|
|
|
|
|
|
|
|
|
# Create a history folder in our latest version's output
|
|
|
|
|
mkdir ./latest/_book/history
|
|
|
|
|
|
|
|
|
|
# Move each version's files to latest's history folder
|
|
|
|
|
for D in *; do
|
|
|
|
|
if [ -d "${D}" ]; then
|
|
|
|
|
if [[ "${D}" == v* ]] ; then
|
|
|
|
|
echo "Moving ${D} to the latest version's history folder"
|
|
|
|
|
|
|
|
|
|
mkdir "./latest/_book/history/${D}"
|
|
|
|
|
mv -v "./${D}/_book"/* "./latest/_book/history/${D}"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
done
|
2018-07-23 10:19:52 +02:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
# Build and copy the StandaloneViewer into the static directory
|
2018-12-17 21:23:50 +01:00
|
|
|
echo $DEPLOY_PRIME_URL
|
2019-02-02 12:10:56 +01:00
|
|
|
cd Packages-react/ohif-viewer
|
2019-02-13 14:58:40 +01:00
|
|
|
export ROOT_URL=$DEPLOY_PRIME_URL/demo
|
2019-02-02 12:10:56 +01:00
|
|
|
|
2018-12-17 21:23:50 +01:00
|
|
|
cat package.json
|
2019-02-02 12:10:56 +01:00
|
|
|
yarn install
|
|
|
|
|
yarn build
|
|
|
|
|
|
|
|
|
|
cd example
|
|
|
|
|
yarn install
|
|
|
|
|
yarn run prepare
|
|
|
|
|
sed -i "s,http://localhost:5000,${ROOT_URL},g" index.html
|
2019-02-13 14:58:40 +01:00
|
|
|
sed -i 's,"routerBasename": "/","routerBasename": "/demo",g' index.html
|
2019-02-02 12:10:56 +01:00
|
|
|
rm -rf node_modules
|
2019-03-04 12:51:53 +01:00
|
|
|
mkdir ../../../docs/latest/_book/demo/
|
|
|
|
|
cp -R * ../../../docs/latest/_book/demo/
|
|
|
|
|
cp ../../../_redirects ../../../docs/latest/_book/_redirects
|