-
Notifications
You must be signed in to change notification settings - Fork 5
/
rebar.config
112 lines (102 loc) · 4.23 KB
/
rebar.config
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
%% ------------------------------------------------------------------
%% Erlang Configuration
%% ------------------------------------------------------------------
{erl_opts, [
debug_info,
inline_list_funcs,
warn_deprecated_function,
warn_export_all,
warn_export_vars,
warn_obsolete_guard,
warn_shadow_vars,
warn_untyped_record,
warn_unused_function,
warn_unused_import,
warnings_as_errors,
{parse_transform, lager_transform} %% makes errors look good with lager
]}.
{cover_enabled, true}. %% http://erlang.org/doc/man/cover.html
%% ------------------------------------------------------------------
%% Rebar3 Configuration
%% ------------------------------------------------------------------
%% hotfix for merl as per https://github.com/erlang/rebar3/issues/1#issuecomment-113697051
{overrides, [{override, merl,
[{pre_hooks,
[{"(linux|darwin|solaris)", compile, "make -C \"$REBAR_DEPS_DIR/merl\" all -W test"},
{"(freebsd|netbsd|openbsd)", compile, "gmake -C \"$REBAR_DEPS_DIR/merl\" all"},
{"win32", compile, "make -C \"%REBAR_DEPS_DIR%/merl\" all -W test"},
{eunit,
"erlc -I include/erlydtl_preparser.hrl -o test"
" test/erlydtl_extension_testparser.yrl"},
{"(linux|darwin|solaris)", eunit, "make -C \"$REBAR_DEPS_DIR/merl\" test"},
{"(freebsd|netbsd|openbsd)", eunit, "gmake -C \"$REBAR_DEPS_DIR/merl\" test"},
{"win32", eunit, "make -C \"%REBAR_DEPS_DIR%/merl\" test"}
]}]}]}.
%% http://www.rebar3.org/v3.0/docs/releases
{relx, [
{
release, %% type of erlang project
{erlang_notebook, "0.1.0"}, %% our release name and version
[ %% these are the apps that are required for this release
erlang_notebook_api,
erlang_notebook_gen_server,
erlang_notebook_mnesia_db,
erlang_notebook_nif,
erlang_notebook_web,
mnesia, %% Erlang's distributed transactional database server - http://erlang.org/doc/man/mnesia.html
sasl, %% http://erlang.org/doc/man/sasl_app.html
{observer, load}, %% monitoring and debugging tool, but only needs to be loaded not running
{wx, load}, %% required by observer
{runtime_tools, load} %% required by observer
]
},
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"},
{dev_mode, true},
{include_erts, false},
{extended_start_script, true}
]}.
{profiles, [ %% http://www.rebar3.org/docs/profiles
{prod, [
{relx, [
{dev_mode, false},
{include_erts, true},
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"}
]},
{cover_enabled, false}
]},
{dev, [
{relx, [
{dev_mode, false},
{include_erts, true},
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"}
]},
{cover_enabled, false}
]},
{test, [
{relx, [
{dev_mode, false}
]},
{cover_enabled, false}
]}
]}.
{xref_checks, [ %% http://www.rebar3.org/docs/configuration %% NOTE: extra warnings and compile time errors!! (works with Makefile)
undefined_function_calls,
undefined_functions,
locals_not_used,
exports_not_used,
deprecated_function_calls,
deprecated_functions
]}.
%% ------------------------------------------------------------------
%% Dependencies and Plugins
%% ------------------------------------------------------------------
{deps, [ %% http://www.rebar3.org/docs/dependencies
{lager, {git, "https://github.com/basho/lager", {branch, "master"}}} %% logging and errors
]}.
{plugins, [ %% http://www.rebar3.org/docs/using-available-plugins
{rebar3_run, {git, "https://github.com/tsloughter/rebar3_run.git", {branch, "master"}}}, %% run release easily via rebar3
{rebar3_erlydtl_plugin, {git, "https://github.com/tsloughter/rebar3_erlydtl_plugin.git", {branch, "master"}}} %% NOTE: turns on hooks for DTL in lower level configs
]}.