-
Notifications
You must be signed in to change notification settings - Fork 84
/
Makefile
59 lines (40 loc) · 1.19 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
.PHONY: all compile run test doc clean
REBAR=$(shell which rebar3 || echo ./rebar3)
MINIMAL_COVERAGE=80
all: compile
compile: $(REBAR)
$(REBAR) compile
run: $(REBAR)
@$(REBAR) as test shell --apps pooler --config config/demo.config
eunit: $(REBAR)
$(REBAR) eunit --verbose --cover
proper: $(REBAR)
$(REBAR) proper --cover
cover: $(REBAR)
$(REBAR) cover --verbose --min_coverage $(MINIMAL_COVERAGE)
test: eunit proper cover
xref: $(REBAR)
$(REBAR) xref
format: $(REBAR)
$(REBAR) fmt
format_check: $(REBAR)
$(REBAR) fmt --check
doc: $(REBAR)
$(REBAR) edoc
clean: $(REBAR)
$(REBAR) clean
$(REBAR) as test clean
@rm -rf ./erl_crash.dump
dialyzer: $(REBAR)
$(REBAR) dialyzer
hotupgrade_setup: $(REBAR)
./test/hotupgrade_test.sh setup $(BASE_REV)
hotupgrade_check:
./test/hotupgrade_test.sh check
# Get rebar3 if it doesn't exist. If rebar3 was found on PATH, the
# $(REBAR) dep will be satisfied since the file will exist.
REBAR_URL = https://s3.amazonaws.com/rebar3/rebar3
./rebar3:
@echo "Fetching rebar3 from $(REBAR_URL)"
@erl -noinput -noshell -s inets -s ssl -eval '{ok, _} = httpc:request(get, {"${REBAR_URL}", []}, [], [{stream, "${REBAR}"}])' -s init stop
chmod +x ${REBAR}