forked from helium/miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·62 lines (45 loc) · 1.37 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
.PHONY: deps compile test typecheck cover
REBAR=./rebar3
VAL_VERSION=$(shell git describe --abbrev=0 | sed -e 's,validator,,')
ifeq ($(BUILDKITE), true)
# get branch name and replace any forward slashes it may contain
CIBRANCH=$(subst /,-,$(BUILDKITE_BRANCH))
else
CIBRANCH=$(shell git rev-parse --abbrev-ref HEAD | sed 's/\//-/')
endif
all: compile
deps:
$(REBAR) get-deps
compile:
$(REBAR) compile
clean:
$(REBAR) clean
test: compile
$(REBAR) as test do eunit, ct --verbose
typecheck:
$(REBAR) dialyzer xref
ci: compile
$(REBAR) do dialyzer,xref && ($(REBAR) do eunit,ct || (mkdir -p artifacts; tar --exclude='./_build/test/lib' --exclude='./_build/test/plugins' -czf artifacts/$(CIBRANCH).tar.gz _build/test; false))
release:
$(REBAR) as prod release -n miner
validator:
$(REBAR) as validator release -n miner -v $(VAL_VERSION)
cover:
$(REBAR) cover
aws:
$(REBAR) as aws release
seed:
$(REBAR) as seed release
docker:
$(REBAR) as docker release
devrel:
$(REBAR) as testdev, miner1 release -n miner1
$(REBAR) as testdev, miner2 release -n miner2
$(REBAR) as testdev, miner3 release -n miner3
$(REBAR) as testdev, miner4 release -n miner4
$(REBAR) as testdev, miner5 release -n miner5
$(REBAR) as testdev, miner6 release -n miner6
$(REBAR) as testdev, miner7 release -n miner7
$(REBAR) as testdev, miner8 release -n miner8
devrelease:
$(REBAR) as dev release