-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
42 lines (35 loc) · 999 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
# These are for both `run` (implicit) and `test` (explicit)
PATH_INFO ?= /fileserver.gr
X_MATCHED_ROUTE ?= /static/...
BINDLE_SERVER_URL ?= http://localhost:8080/v1
.PHONY: run
run:
PATH_INFO=${PATH_INFO} X_MATCHED_ROUTE=${X_MATCHED_ROUTE} \
grain fileserver.gr
.PHONY: build
build:
grain compile fileserver.gr
.PHONY: test-unit
test-unit:
grain tests.gr
.PHONY: test
test:build
test: test-unit
test:
@echo EXPECT: Loading file fileserver.gr
wasmtime --dir . --env PATH_INFO=${PATH_INFO} \
--env X_MATCHED_ROUTE=${X_MATCHED_ROUTE} \
fileserver.gr.wasm > /dev/null
.PHONY: push
push:
hippofactory -s ${BINDLE_SERVER_URL} .
doc: lib/*.gr
grain doc lib/env.gr -o lib/env.md
grain doc lib/mediatype.gr -o lib/mediatype.md
grain doc lib/stringutil.gr -o lib/stringutil.md
fmt: *.gr lib/*.gr
grain format fileserver.gr --in-place
grain format tests.gr --in-place
grain format lib/env.gr --in-place
grain format lib/mediatype.gr --in-place
grain format lib/stringutil.gr --in-place