-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (42 loc) · 990 Bytes
/
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
DOCKER ?= podman
.PHONY: all
all:
dune build @default
cp _build/install/default/share/ghm/app.js webroot/app.js
.PHONY: opt
opt:
dune build --profile release @default
cp _build/install/default/share/ghm/app.js webroot/app.js
.PHONY: watch
watch:
fd 'ml|dune' | entr -s 'make all'
.PHONY: static
static:
${DOCKER} pull ocaml/opam2:alpine-3.10-ocaml-4.07
${DOCKER} build -t ghm-image-ocaml -f static-Dockerfile .
${DOCKER} run -it --userns=keep-id -v $(shell pwd):/src:z ghm-image-ocaml
ghm.opam: dune-project
dune build ghm.opam
deps: ghm.opam
opam install . --deps-only
switch:
opam switch create . 4.07.1 --deps-only
.PHONY: format
format:
# do not auto promote test output
dune runtest && dune build @fmt --auto-promote
.PHONY: up
up:
cd svc; make up
.PHONY: down
down:
cd svc; make down
.PHONY: psql
psql:
cd svc; make psql
.PHONY: psql
clean:
dune clean
.PHONY: psql
deploy-webroot: opt
rsync -a --delete --info=progress2 svc/webroot/ hestia:ghm/webroot/