forked from IRus/social-architecture-ru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·29 lines (23 loc) · 895 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
#!/bin/bash
set -e
mkdir -p dist
echo "Building html"
docker run --rm -v "$(pwd)":/documents/ \
asciidoctor/docker-asciidoctor asciidoctor index.adoc \
--out-file=dist/index.html \
-a revdate="$(date "-I")" \
-a revnumber="#${TRAVIS_COMMIT:-$(git log --pretty=format:'%h' -n 1)}"
cp cover.png dist/cover.png
echo "Building pdf"
docker run --rm -v "$(pwd)":/documents/ \
asciidoctor/docker-asciidoctor asciidoctor-pdf index.adoc \
--out-file=dist/social-architecture-ru.pdf \
-a revdate="$(date "-I")" \
-a revnumber="#${TRAVIS_COMMIT:-$(git log --pretty=format:'%h' -n 1)}"
echo "Building epub"
docker run --rm -v "$(pwd)":/documents/ \
asciidoctor/docker-asciidoctor asciidoctor-epub3 index.adoc \
--out-file=dist/social-architecture-ru.epub \
-a revdate="$(date "-I")" \
-a revnumber="#${TRAVIS_COMMIT:-$(git log --pretty=format:'%h' -n 1)}"
echo "Building done"