-
Notifications
You must be signed in to change notification settings - Fork 70
/
Makefile
72 lines (58 loc) · 2.08 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ifneq ($(COMMIT_ID),)
DO_COMMIT_ID = '--commit=$(COMMIT_ID)'
endif
SHELL := /bin/bash
LABS=index.adoc \
overview/overview_index.adoc \
terminology/terminology_index.adoc \
planning/planning_index.adoc \
creating/creating_index.adoc \
building/building_index.adoc \
testing/testing_index.adoc \
delivering/delivering_index.adoc
ALL_ADOC_FILES := $(shell find . -type f -name '*.adoc')
all: $(LABS) labs
labs: $(LABS)
asciidoctor -a linkcss -a stylesheet=http://www.projectatomic.io/stylesheets/application.css index.adoc
#a2x -fpdf -dbook --fop --no-xmllint -v labs.asciidoc
$(foreach lab,$(LABS), asciidoctor -a linkcss -a stylesheet=http://www.projectatomic.io/stylesheets/application.css $(lab);)
html:
# asciidoctor can only put a single HTML output
# chunked output is close per upstream
asciidoctor -d book -a linkcss -a stylesheet=http://www.projectatomic.io/stylesheets/application.css index.adoc
plain-html:
asciidoctor index.adoc
publish: $(LABS)
git branch -D gh-pages
asciidoctor -a linkcss -a stylesheet=http://www.projectatomic.io/stylesheets/application.css index.adoc
git checkout -b gh-pages
git commit index.html -m "Update"
git push origin gh-pages -f
pdf: $(LABS)
#a2x -fpdf -dbook --fop --no-xmllint -v index.adoc
asciidoctor -r asciidoctor-pdf -b pdf -o container_best_practices.pdf index.adoc
epub: $(LABS) $(SLIDES)
a2x -fepub -dbook --no-xmllint -v index.adoc
check:
# Disabled for now
#@for docsrc in $(ALL_ADOC_FILES); do \
# echo -n "Processing '$$docsrc' ..."; \
# cat $$docsrc | aspell -a --lang=en \
# --dont-backup \
# --personal=./containers.dict | grep -e '^&'; \
# [ "$$?" == "0" ] && exit 1 || echo ' no errors.'; \
#done
echo "Disabled"
toc:
asciidoctor index.adoc
python toc.py
clean:
find . -type f -name \*.html -exec rm -f {} \;
find . -type f -name \*.pdf -exec rm -f {} \;
find . -type f -name \*.epub -exec rm -f {} \;
find . -type f -name \*.fo -exec rm -f {} \;
find . -type f -name \*.xml -exec rm -f {} \;
rm -fr output/
review:
python mark_change.py ${ALL_ADOC_FILES} ${DO_COMMIT_ID}
cd output && asciidoctor index.adoc