Skip to content

Commit

Permalink
Change rebar2 to rebar3
Browse files Browse the repository at this point in the history
  • Loading branch information
ates committed Mar 18, 2016
1 parent 457b687 commit 6ef2da4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 38 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
ebin/
priv/
.eunit/
.test
_build
*.swp
rebar
*.beam
.depsolver_plt
35 changes: 8 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
REBAR=$(shell which rebar || echo ./rebar)
DEPSOLVER_PLT=$(CURDIR)/.depsolver_plt
REBAR = $(shell which rebar3 || echo ./rebar3)

all: compile
.PHONY: test

./rebar:
erl -noshell -s inets start -s ssl start \
-eval 'httpc:request(get, {"https://github.com/downloads/basho/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar

compile: $(REBAR)
compile:
@$(REBAR) compile

clean: $(REBAR)
clean:
@$(REBAR) clean

test: compile
@$(REBAR) xref eunit

.PHONY: test dialyzer typer clean distclean

$(DEPSOLVER_PLT):
@dialyzer $(DIALYZER_FLAGS) --output_plt $(DEPSOLVER_PLT) --build_plt \
--apps erts kernel stdlib crypto

dialyzer: $(DEPSOLVER_PLT)
@dialyzer $(DIALYZER_FLAGS) --plt $(DEPSOLVER_PLT) -Wrace_conditions --src src test

typer: $(DEPSOLVER_PLT)
@typer -I include --plt $(DEPSOLVER_PLT) -r src
test:
@$(REBAR) as test do xref,eunit

distclean: clean
@rm $(DEPSOLVER_PLT)
dialyzer:
@$(REBAR) dialyzer
17 changes: 13 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{xref_checks, [undefined_function_calls]}.

{cover_enabled, true}.
{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "."}]}}]}.
{profiles, [
{test, [
{erl_opts, [
debug_info
]},
{cover_enabled, true},
{cover_opts, [verbose]},
{xref_checks, [undefined_function_calls]},
{deps, [
{pcapfile, {git, "https://github.com/ates/pcapfile.git", {branch, "master"}}}
]}
]}
]}.
1 change: 1 addition & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[].
3 changes: 3 additions & 0 deletions rebar3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

erl -pz /home/ates/.cache/rebar3/lib/*/ebin +sbtu +A0 -noshell -boot start_clean -s rebar3 main $REBAR3_ERL_ARGS -extra "$@"

0 comments on commit 6ef2da4

Please sign in to comment.