Skip to content

Commit

Permalink
Merge pull request #21 from danikp/rebar3
Browse files Browse the repository at this point in the history
Rebar3
  • Loading branch information
danikp authored Jul 8, 2016
2 parents e5af421 + 53dcdf2 commit 747c18d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 30 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
ebin
aleppo_parser.erl
/.settings/
/.project
.rebar
/_build
aleppo_parser.erl
ebin
rebar.lock
/ebin
/doc
.rebar
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: erlang
sudo: false
otp_release:
# Test on all supported releases
- 19.0
- 18.3
- 18.2.1
- 18.1
- 18.0
Expand All @@ -22,7 +24,6 @@ otp_release:

script:
- make
- make plt
- make dialyze
notifications:
email: false
29 changes: 7 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
REBAR=./rebar
REBAR=./rebar3
GIT = git
REBAR_VER = 2.6.1

## dialyzer
PLT_FILE = ~/aleppo.plt
PLT_APPS ?= kernel stdlib erts
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
-Wunderspecs --verbose --fullpath -n
REBAR_VER = 3.2.0

all: compile

Expand All @@ -18,26 +12,17 @@ run:

rebar_src:
@rm -rf $(PWD)/rebar_src
@$(GIT) clone git://github.com/rebar/rebar.git rebar_src
@$(GIT) clone https://github.com/erlang/rebar3.git rebar_src
@$(GIT) -C rebar_src checkout tags/$(REBAR_VER)
@cd $(PWD)/rebar_src/; ./bootstrap
@cp $(PWD)/rebar_src/rebar $(PWD)
@cp $(PWD)/rebar_src/rebar3 $(PWD)
@rm -rf $(PWD)/rebar_src

dialyze: all
@[ -f $(PLT_FILE) ] || $(MAKE) plt
@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];

## In case you are missing a plt file for dialyzer,
## you can run/adapt this command
plt:
@echo "Building PLT, may take a few minutes"
@dialyzer --build_plt --output_plt $(PLT_FILE) --apps \
$(PLT_APPS) || [ $$? -eq 2 ];
dialyze:
@$(REBAR) dialyzer

clean:
@rm -fv erl_crash.dump
@rm -f $(PLT_FILE)
@$(REBAR) clean

.PHONY: all compile run dialyze plt clean
.PHONY: all compile run dialyze clean
Binary file removed rebar
Binary file not shown.
13 changes: 13 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@
warn_exported_vars,
{platform_define, "^R|17", pre18}
]}.

%% == Dialyzer ==
{dialyzer, [
{warnings, [error_handling, race_conditions, unmatched_returns, underspecs]},
{get_warnings, false},
{plt_apps, top_level_deps}, % top_level_deps | all_deps
{plt_extra_apps, []},
{plt_location, local}, % local | "/my/file/name"
{plt_prefix, "rebar3"},
{base_plt_apps, [stdlib, kernel, crypto]},
{base_plt_location, global}, % global | "/my/file/name"
{base_plt_prefix, "rebar3"}
]}.
Binary file added rebar3
Binary file not shown.
10 changes: 6 additions & 4 deletions src/aleppo.app.src
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
%% -*- mode: erlang -*-
{application, aleppo,
[{description, "Aleppo: ALternative Erlang Pre-ProcessOr"},
{vsn, "0.9"},
{modules, [
]},
{vsn, "0.9.1"},
{modules, []},
{applications, [kernel, stdlib]},
{registered, []}
{registered, []},
{maintainers,["ErlyORM"]},
{licenses,["MIT/X11"]},
{links,[{"Github","https://github.com/ErlyORM/aleppo"}]}
]}.

0 comments on commit 747c18d

Please sign in to comment.