-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathTaskfile.yml
63 lines (54 loc) · 1.8 KB
/
Taskfile.yml
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
version: "3"
vars:
PLANTUML_RENDERER_VERSION: 1.2021.5
DRAWIO_EXPORT_VERSION: 4.1.0
tasks:
_mkdir:
cmds:
- mkdir -p diagrams/render-png
- mkdir -p diagrams/render-svg
clean:
desc: Delete all rendered diagrams
cmds:
- rm -fr diagrams/render-png
- rm -fr diagrams/render-svg
render:
desc: Render all diagrams
cmds:
- task: render:plantuml
- task: render:drawio
build:plantuml:
desc: Build the container image we use for rendering plantuml
dir: ../tools/plantuml
cmds:
# We do not publish the image as it is very then wrapper around a download
# of platuml an as such having a published image would just be an extra
# thing to keep track of.
- IMAGE_URL=plantuml TAG=0.0.0 PLANTUML_VERSION={{.PLANTUML_RENDERER_VERSION}} task build
render:plantuml:
desc: Render svg and png versions plantuml diagrams
deps: [_mkdir, build:plantuml]
cmds:
# PDF is currently not supported: https://plantuml.com/pdf
- |
docker run \
-v "${PWD}/diagrams/:/checkout" \
-w "/checkout" \
plantuml:0.0.0 \
-verbose -tpng -o render-png *.puml
- |
docker run \
-v "${PWD}/diagrams/:/checkout" \
-w "/checkout" \
plantuml:0.0.0 \
-verbose -tsvg -o render-svg *.puml
render:drawio:
desc: Render svg and png versions drawio diagrams
deps: [_mkdir]
cmds:
- |
docker run \
-v "${PWD}/diagrams:/data" rlespinasse/drawio-export:{{.DRAWIO_EXPORT_VERSION}} --remove-page-suffix --format png --output render-png --scale 2
- |
docker run \
-v "${PWD}/diagrams:/data" rlespinasse/drawio-export:{{.DRAWIO_EXPORT_VERSION}} --remove-page-suffix --format svg --output render-svg --scale 2