forked from apiaryio/example-intersphinx-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·30 lines (21 loc) · 785 Bytes
/
build.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
#!/bin/bash
SPHINX_IMAGE_NAME="apiaryio/base-sphinx-doc-dev"
TAG_NAME="apiaryio/example-intersphinx-repo-shared-inventories"
CONTAINER_NAME="example-intersphinx-repo-shared-inventories-volume"
(
cd "./example-standalone-docs/" && \
docker run -ti --rm -v $(pwd):/mnt/docs:rw -w /mnt/docs $SPHINX_IMAGE_NAME
) && \
cp ./example-standalone-docs/build/html/objects.inv ./shared-invs/inventories/other-project.inv && \
(
cd "./shared-invs" && \
docker build -t $TAG_NAME .
) && \
docker create -v /inventories --name=$CONTAINER_NAME $TAG_NAME /bin/true && \
(
cd "./example-intersphinx-project/" && \
docker run -ti --rm -v $(pwd):/mnt/docs:rw -w /mnt/docs --volumes-from=$CONTAINER_NAME $SPHINX_IMAGE_NAME
)
exitcode=$?
docker rm $CONTAINER_NAME > /dev/null
exit $exitcode