-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakeViews.sh
More file actions
executable file
·26 lines (19 loc) · 1.09 KB
/
makeViews.sh
File metadata and controls
executable file
·26 lines (19 loc) · 1.09 KB
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
#!/bin/sh
# Install node_modules, if not already installed
if [ ! -r ./node_modules ]; then
docker run --rm --volume $PWD:/src -w "/src" capsulecorplab/hugo-asciidoctor-plantuml:0.76.5-alpine 'npm ci'
fi
# create dist/ directory, if it doesn't already exist
if [ ! -r dist/ ]; then
mkdir dist/
fi
# build the unified model
docker run --rm --volume $PWD:/src -w "/src" capsulecorplab/hugo-asciidoctor-plantuml:0.76.5-alpine 'node scripts/buildUnifiedModel.js'
# process the unified model (e.g. generate required images for architecture.adoc)
# TODO
# rename architecture.yaml to architecture.yml
mv dist/architecture.yaml dist/architecture.yml
# generate contents of architecture.adoc
docker run --rm --volume $PWD:/src -w "/src" capsulecorplab/asciidoctor-extended:liquidoc 'bundle exec liquidoc -d dist/architecture.yml -t templates/architecture.adoc.liquid -o dist/architecture.adoc'
# generate html & pdf docs using asciidoctor
docker run --rm --volume $PWD:/src -w "/src" capsulecorplab/asciidoctor-extended:liquidoc 'asciidoctor dist/architecture.adoc -r asciidoctor-diagram -o dist/index.html'