forked from hendricius/the-sourdough-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
46 lines (32 loc) · 1.19 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
.DEFAULT_GOAL := build_pdf
DOCKER_IMAGE := ghcr.io/hendricius/the-sourdough-framework
DOCKER_CMD := docker run --rm -it -v $(PWD):/opt/repo --platform linux/x86_64 $(DOCKER_IMAGE) /bin/bash -c
.PHONY: bake build_pdf build_docker_image push_docker_image validate website
.PHONY: print_os_version start_shell printvars show_tools_version mrproper
# Dockers targets
build_docker_image:
docker build -t $(DOCKER_IMAGE) -f Dockerfile --progress=plain .
push_docker_image: build_docker_image
docker push $(DOCKER_IMAGE):latest
# Books/website
build_serif_pdf:
$(DOCKER_CMD) "cd /opt/repo/book && make build_serif_pdf"
build_ebook:
$(DOCKER_CMD) "cd /opt/repo/book && make build_ebook"
build_pdf:
$(DOCKER_CMD) "cd /opt/repo/book && make"
bake:
$(DOCKER_CMD) "cd /opt/repo/book && make -j bake"
website:
$(DOCKER_CMD) "cd /opt/repo/book && make website"
mrproper:
$(DOCKER_CMD) "cd /opt/repo/book && make mrproper"
# Debug helpers
show_tools_version:
$(DOCKER_CMD) "cd /opt/repo/book && make show_tools_version"
printvars:
$(DOCKER_CMD) "cd /opt/repo/book && make printvars"
print_os_version:
$(DOCKER_CMD) "cat /etc/*release"
start_shell:
docker run -it -v $(PWD):/opt/repo $(DOCKER_IMAGE) /bin/bash