-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
55 lines (42 loc) · 1.2 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
47
48
49
50
51
52
53
54
55
POSIXCUBE_BIN ?= ~/Projects/posixcube/posixcube.sh
.PHONY: ghcid
ghcid:
# http://www.parsonsmatt.org/2018/05/19/ghcid_for_the_win.html
ghcid --command "cabal new-repl backend-exe" --test "main"
.PHONY: test
test:
pg_virtualenv -s $(MAKE) fulltest
.PHONY: fulltest
fulltest:
./bin/setup_database.sh
stack test
.PHONY: clean
clean:
cabal new-clean
.PHONY: deb
deb: build clean
dpkg-buildpackage -us -uc
.PHONY: build
build: clean
cabal new-build
.PHONY: serve
serve:
stack exec backend-exe
.PHONY: deploybaseconfiguration
deploybaseconfiguration:
${POSIXCUBE_BIN} -u root -h izidict.com -c ./cubes/base_configuration
.PHONY: deploydehydrated
deploydehydrated:
${POSIXCUBE_BIN} -u root -h izidict.com -e ./production.env -c ./cubes/dehydrated
.PHONY: deployprimarydb
deployprimarydb:
${POSIXCUBE_BIN} -u flog -h izidict.com -c ./cubes/postgresql
.PHONY: deploynginx
deploynginx:
${POSIXCUBE_BIN} -u flog -h izidict.com -e ./production.env -c ./cubes/nginx
BACKEND_BIN=$(stack exec -- which backend-exe)
.PHONY: deploy
deploy:
scp ../izidict_0.1_all.deb [email protected]:~/
ssh [email protected] -- dpkg -i izidict_0.1_amd64.deb </dev/null
ssh [email protected] -- systemctl restart izidict </dev/null