-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
57 lines (42 loc) · 1.6 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
builder:
docker compose build
develop: builder
docker compose run --service-ports doc env $(ENV) yarn develop -H 0.0.0.0
DOCKER_COMPOSE_BETA=docker compose -f docker-compose.beta.yml
beta/builder:
$(DOCKER_COMPOSE_BETA) build
beta/develop: beta/builder
$(DOCKER_COMPOSE_BETA) run --rm --service-ports doc bash -c "yarn install && yarn docusaurus start -h 0.0.0.0 $(ARGS)"
check-format-uc-doc:
docker compose run --no-TTY doc yarn check-format:uc-doc
format:
docker compose -f docker-compose.yml -f docker-compose.format.yml run doc yarn format
format-uc-doc:
docker compose -f docker-compose.yml -f docker-compose.format.yml run doc yarn format:uc-doc
build:
rm -rf public
docker compose up -d doc
docker compose exec -T doc env $(ENV) yarn build
docker cp "$$(docker compose ps -q doc)":/app/public public
docker compose down
test:
docker compose -f docker-compose.yml -f docker-compose-tests.yml up --exit-code-from test test
clean:
docker compose down
import:
./import-plantuml.sh
DIAGRAM_DIRECTORY=public/diagrams
plantuml-diagrams:
mkdir -p $(DIAGRAM_DIRECTORY)
for f in $$(find content -name '*.puml'|grep -v /plantuml/); do \
cp -p $$f $(DIAGRAM_DIRECTORY)/$$(basename $$(dirname $$f))-$$(basename $$f); \
done
$(MAKE) plantuml-run
rm -f $(DIAGRAM_DIRECTORY)/*.puml
plantuml-run:
outputs="$(patsubst %.puml,%.svg,$(wildcard $(DIAGRAM_DIRECTORY)/*.puml))"; \
cp content/plantuml/*.puml $(DIAGRAM_DIRECTORY); \
$(MAKE) $${outputs}
%.svg: %.puml
java -jar ${JAVA_HOME}/lib/plantuml.jar -tsvg -o$(DIAGRAM_DIRECTORY) $^
.PHONY: builder build develop format test clean import plantuml-diagrams