forked from michelin/Continuous-Architecture-Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-docs.sh
executable file
·40 lines (26 loc) · 1.31 KB
/
build-docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env sh
WORKDIR=$(pwd)
echo $(pwd)
mkdir -p dist/docs
echo "Render Asciidoctor HTML content in 'dist/docs/index.html' from 'docs' directory"
# docker run --rm -v $WORKDIR:/documents/ asciidoctor/docker-asciidoctor asciidoctor -D dist/docs --backend=html5 docs/index.adoc
docker run --rm -v $WORKDIR:/documents/ asciidoctor/docker-asciidoctor asciidoctor stylesheet=./stylesheet-factory/stylesheets/continuous-architecture.css -D dist/docs -R landing/docs '**/*.adoc' -d book
if [ $? -eq 0 ]; then
echo "Successfully rendered Asciidoctor HTML content in 'dist/docs/index.html'"
else
echo "Failed to render asciidoctor HTML content correctly!"
exit $?
fi
cd docs
echo "Copy images in 'dist/docs' directory"
# find . -iname '*.jpg' -exec rsync -R {} ../dist/docs \;
# find . -iname '*.png' -exec rsync -R {} ../dist/docs \;
1 cd $WORKDIR
echo "Render Asciidoctor PDF content in 'dist/docs/continuous-architecture.pdf' from 'docs' directory"
# docker run --rm -v $WORKDIR:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf --out-file dist/docs/continuous-architecture.pdf docs/index.adoc
# if [ $? -eq 0 ]; then
# echo "Successfully rendered Asciidoctor PDF content in 'dist/docs/continuous-architecture.pdf'"
# else
# echo "Failed to render asciidoctor PDF content correctly!"
# exit $?
# fi