-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (34 loc) · 842 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
NAME = phone_book
.PHONY: all
all: build
.PHONY: node_modules
.SILENT: node_modules
node_modules:
npm install
.PHONY: build
.SILENT: build
build: node_modules
dfx canister create --all
dfx build
.PHONY: install
.SILENT: install
install: build
dfx canister install --all
.PHONY: upgrade
.SILENT: upgrade
upgrade: build
dfx canister install --all --mode=upgrade
.PHONY: test
.SILENT: test
test: install
dfx canister call phone_book insert '("Police", record { desc = "Call if you have an emergency."; phone = "911" })'
dfx canister call phone_book lookup '("Police")' \
| grep '911' && echo 'PASS'
# This test needs to be rewritten for the new HTTP based architecture
# dfx canister call www retrieve '("index.js")' \
# | grep 'Phone Book' && echo 'PASS'
.PHONY: clean
.SILENT: clean
clean:
rm -fr .dfx
rm -fr node_modules