forked from helium/erlang-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 926 Bytes
/
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
.PHONY: compile rel cover test typecheck doc ci
REBAR=./rebar3
SHORTSHA=`git rev-parse --short HEAD`
PKG_NAME_VER=${SHORTSHA}
OS_NAME=$(shell uname -s)
ifeq (${OS_NAME},FreeBSD)
make="gmake"
else
MAKE="make"
endif
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
compile:
$(REBAR) compile
shell:
$(REBAR) shell
clean:
$(REBAR) clean
cover:
$(REBAR) cover
test:
$(REBAR) as test do eunit,ct
ci:
($(REBAR) do ct || (mkdir -p artifacts; tar --exclude='./_build/test/lib' --exclude='./_build/test/plugins' -czf artifacts/$(CIBRANCH).tar.gz _build/test; false))
$(REBAR) do eunit,xref,dialyzer,cover
$(REBAR) covertool generate
codecov --required -f _build/test/covertool/libp2p.covertool.xml
typecheck:
$(REBAR) dialyzer
doc:
$(REBAR) edoc