forked from AntidoteDB/antidote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (64 loc) · 1.68 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
89
REBAR = $(shell pwd)/rebar3
COVERPATH = $(shell pwd)/_build/test/cover
.PHONY: rel test relgentlerain docker-build docker-run
all: compile
compile:
$(REBAR) compile
clean:
$(REBAR) clean
distclean: clean relclean
$(REBAR) clean --all
shell: rel
export NODE_NAME=antidote@127.0.0.1 ; \
export COOKIE=antidote ; \
export ROOT_DIR_PREFIX=$$NODE_NAME/ ; \
_build/default/rel/antidote/bin/antidote console ${ARGS}
rel:
$(REBAR) release
relclean:
rm -rf _build/default/rel
reltest: rel
test/release_test.sh
# style checks
lint:
${REBAR} lint
check: distclean test reltest dialyzer lint
relgentlerain: export TXN_PROTOCOL=gentlerain
relgentlerain: relclean rel
relnocert: export NO_CERTIFICATION=true
relnocert: relclean rel
stage :
$(REBAR) release -d
test:
${REBAR} eunit
coverage:
${REBAR} cover --verbose
singledc:
ifdef SUITE
${REBAR} ct --dir test/singledc --suite ${SUITE}
else
${REBAR} ct --dir test/singledc --cover_export_name=singledc
endif
multidc:
ifdef SUITE
${REBAR} ct --dir test/multidc --suite ${SUITE}
else
${REBAR} ct --dir test/multidc --cover_export_name=multidc
endif
systests: singledc multidc
docs:
${REBAR} doc skip_deps=true
xref: compile
${REBAR} xref skip_deps=true
dialyzer:
${REBAR} dialyzer
docker-build:
tmpdir=`mktemp -d` ; \
wget "https://raw.githubusercontent.com/AntidoteDB/docker-antidote/master/local-build/Dockerfile" -O "$$tmpdir/Dockerfile" ; \
docker build -f $$tmpdir/Dockerfile -t antidotedb:local-build .
docker-run: docker-build
docker run -d --name antidote -p "8087:8087" antidotedb:local-build
docker-clean:
ifneq ($(docker images -q antidotedb:local-build 2> /dev/null), "")
docker image rm -f antidotedb:local-build
endif