forked from AntidoteDB/antidote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (61 loc) · 2.1 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
REBAR = $(shell pwd)/rebar3
.PHONY: rel test relgentlerain
all: compile
compile:
$(REBAR) compile
clean:
$(REBAR) clean
distclean: clean relclean
$(REBAR) clean --all
cleantests:
rm -f test/utils/*.beam
rm -f test/singledc/*.beam
rm -f test/multidc/*.beam
rm -rf logs/
shell:
$(REBAR) shell --name='[email protected]' --setcookie antidote --config config/sys-debug.config
# same as shell, but automatically reloads code when changed
# to install add `{plugins, [rebar3_auto]}.` to ~/.config/rebar3/rebar.config
# the tool requires inotifywait (sudo apt install inotify-tools)
# see https://github.com/vans163/rebar3_auto or http://blog.erlware.org/rebar3-auto-comile-and-load-plugin/
auto:
$(REBAR) auto --name='[email protected]' --setcookie antidote --config config/sys-debug.config
rel:
$(REBAR) release
relclean:
rm -rf _build/default/rel
reltest: rel
test/release_test.sh
# style checks
lint:
${REBAR} as lint lint
check: distclean cleantests test reltest dialyzer lint
relgentlerain: export TXN_PROTOCOL=gentlerain
relgentlerain: relclean cleantests rel
relnocert: export NO_CERTIFICATION=true
relnocert: relclean cleantests rel
stage :
$(REBAR) release -d
include tools.mk
# Tutorial targets.
tutorial:
docker build -f Dockerfiles/antidote-tutorial -t cmeiklejohn/antidote-tutorial .
docker run -t -i cmeiklejohn/antidote-tutorial
# Mesos targets.
foreground: rel
./_build/default/rel/antidote/bin/env foreground
console: rel
./_build/default/rel/antidote/bin/env console
mesos-docker-build:
docker build -f Dockerfiles/antidote-mesos -t cmeiklejohn/antidote-mesos .
mesos-docker-run: mesos-docker-build
docker run -t -i cmeiklejohn/antidote-mesos
mesos-docker-build-dev:
docker build -f Dockerfiles/antidote-mesos-dev -t cmeiklejohn/antidote-mesos-dev .
mesos-docker-run-dev: mesos-docker-build-dev
docker run -t -i cmeiklejohn/antidote-mesos-dev
docker-build:
docker build -f Dockerfiles/Dockerfile -t antidotedb/antidote Dockerfiles
docker-local:
docker run --rm -v $(shell pwd):/code -w /code erlang:19 make rel
docker build -f Dockerfiles/Dockerfile-local -t antidotedb/antidote:local .