-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
54 lines (42 loc) · 1.12 KB
/
justfile
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
set positional-arguments
set shell := ["bash", "-cue"]
root := justfile_directory()
src := "./src/modos.typ"
pdf := "./build/modos.pdf"
image := "ghcr.io/sdsc-ordes/modos-poster"
tag := "latest"
## Generate poster
# build poster
build-poster *args:
typst compile \
--font-path ./assets/fonts \
--root "{{root}}" \
"{{src}}" "{{pdf}}" {{args}}
# continuously rebuild poster on file changes
watch-poster *args:
typst watch \
--open \
--root "{{root}}" \
--font-path ./assets/fonts \
"{{src}}" "{{pdf}}" {{args}} \
## Development environment
# nix development shell
develop-nix:
nix develop ./tools/nix
# dockerized development shell (alternative to nix)
develop-docker:
chmod -R 777 ./build
docker run \
--user 1000:1000 \
-it \
-w "/build/work" \
--mount type=bind,source="$(pwd)",target=/build/work \
{{image}}:{{tag}}
## Maintenance
# builds oci image with nix and load into docker
docker-build:
nix build -L "./tools/nix#image" --out-link "build/image" \
&& docker load < "build/image"
# build and push image
docker-push: docker-build
docker push {{image}}:{{tag}}