forked from esl/MongooseIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.config
187 lines (163 loc) · 8.07 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{erl_opts, [debug_info,
{i, ["include"]},
{d, xml_nif},
{parse_transform, lager_transform}]}.
%% For behaviour info
{erl_first_files, [
"src/gen_mod.erl",
"src/mod_event_pusher_sns.erl"
]}.
{xref_checks, [undefined_function_calls,
undefined_functions,
locals_not_used,
exports_not_used,
deprecated_function_calls,
deprecated_functions]}.
{port_specs,
[
{".*", "priv/lib/ejabberd_zlib_drv.so", ["c_src/ejabberd_zlib_drv.c"], [{env, [{"LDFLAGS", "$LDFLAGS -lz"}]}]},
{".*", "priv/lib/mongoose_mam_id.so", ["c_src/mongoose_mam_id.cpp"], [{env, [{"CXXFLAGS", "$CXXFLAGS -std=c++11"}]}]}
]}.
{require_min_otp_vsn, "21"}.
%% We agreed to use https:// for deps because of possible firewall issues.
%% By default, deps are downloaded without using git by rebar_faster_deps.
%%
%% If you still prefer git protocol, update your "~/.gitconfig" by running:
%% git config --global url."git://github".insteadOf https://github
{deps,
[
{base16, "1.0.0"},
{exml, {git, "https://github.com/esl/exml.git", {branch, "master"}}},
{lager, "3.8.0"},
{lager_syslog, {git, "https://github.com/erlang-lager/lager_syslog.git", {tag, "3.0.3"}}},
{cowboy, "2.7.0"},
{exometer_core, {git, "https://github.com/esl/exometer_core.git", {branch, "master"}}},
{exometer_report_graphite, {git, "https://github.com/esl/exometer_report_graphite.git", {branch, "master"}}},
{exometer_report_statsd, {git, "https://github.com/esl/exometer_report_statsd.git", {branch, "master"}}},
{jiffy, "1.0.1"},
{fusco, {git, "https://github.com/esl/fusco.git", {branch, "master"}}},
{idna, "6.0.0"},
{uuid, "1.7.5", {pkg, uuid_erl}},
{fast_tls, "1.1.1"},
{lasse, "1.2.0"},
{worker_pool, "4.0.1"},
%% We use a git repo here, because HEX packet pulls riak_pb version
%% that recompiles its files each run of "rebar3 compile"
%% (which slows down development)
{riakc, {git, "https://github.com/basho/riak-erlang-client.git", {branch, "2.5.3"}}},
{cqerl, {git, "https://github.com/esl/cqerl.git", {branch, "master"}}},
{mysql, {git, "https://github.com/mysql-otp/mysql-otp", {tag, "1.5.1"}}},
{epgsql, "4.3.0"},
{eodbc, {git, "https://github.com/arcusfelis/eodbc.git", {branch, "master"}}},
{tirerl, "1.1.0"},
{cache_tab, "1.0.20"},
{stringprep, "1.0.17"},
{proper, "1.3.0"},
{meck, "0.8.13"},
{pa, {git, "https://github.com/erszcz/pa.git", {branch, "master"}}},
{usec, {git, "https://github.com/esl/usec.git", {branch, "master"}}},
{bbmustache, "1.6.1"},
{recon, "2.5.0"},
{erlcloud, "3.2.13"},
{jwerl, "1.1.0"},
{csv, {git, "https://github.com/bszaf/csv.git", {branch, "master"}}},
%% Do not upgrade cpool to version 0.1.1, it has bugs
{cpool, "0.1.0"},
{observer_cli, "1.5.3"},
{nkpacket, {git, "https://github.com/michalwski/nkpacket.git", {ref, "f7c5349"}}},
{nksip, {git, "https://github.com/NetComposer/nksip.git", {ref, "1a29ef3"}}},
{amqp_client, "3.8.0"},
{eredis, "1.2.0"},
{gen_fsm_compat, "0.3.0"},
{erlang_pmp, "0.1.1"},
{erl_csv_generator, ".*", {git, "https://github.com/aleklisi/erl_csv_generator.git"}}
]}.
{relx, [{release, { mongooseim, {cmd, "cat VERSION | tr -d '\r\n'"} },
[]}, %%Apps list is dynamicaly set by rebar.config.script
{dev_mode, true},
%% TODO: extra copies waste space, but mongooseim script requires the files in a certain place
{include_erts, true},
{generate_start_script, false},
{extended_start_script, false},
%% Don't forget to update tools/test_runner/apply_templates.erl, when changing templates
{overlay, [
{mkdir, "priv/ssl"},
{copy, "tools/ssl/mongooseim/cert.pem", "priv/ssl/fake_cert.pem"},
{copy, "tools/ssl/mongooseim/key.pem", "priv/ssl/fake_key.pem"},
{copy, "tools/ssl/mongooseim/server.pem", "priv/ssl/fake_server.pem"},
{copy, "tools/ssl/mongooseim/dh_server.pem", "priv/ssl/fake_dh_server.pem"},
{copy, "tools/ssl/ca/cacert.pem", "priv/ssl/cacert.pem"},
{copy, "rel/files/erl", "erts-\{\{erts_vsn\}\}/bin/erl"},
{template, "rel/files/nodetool", "erts-\{\{erts_vsn\}\}/bin/nodetool"},
{template, "rel/files/mongooseim", "bin/mongooseim"},
{template, "rel/files/mongooseimctl", "bin/mongooseimctl"},
{template, "rel/files/app.config", "etc/app.config"},
{template, "rel/files/vm.args", "etc/vm.args"},
{template, "rel/files/vm.dist.args", "etc/vm.dist.args"},
{copy, "priv/logo.txt", "priv/logo.txt"},
{copy, "VERSION", "priv/VERSION"}
]}
]}.
{dist_node,
[{setcookie, ejabberd},
{sname, 'mongooseim@localhost'}
]}.
{profiles, [ {prod, [{relx, [ {dev_mode, false},
{overlay_vars, "rel/vars.config"},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]},
%% development nodes
{mim1, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim1.vars.config"]},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]},
{mim2, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim2.vars.config"]},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]},
{mim3, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim3.vars.config"]},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]},
{fed1, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/fed1.vars.config"]},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]},
{reg1, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/reg1.vars.config"]},
{overlay, [{template, "rel/files/mongooseim.cfg", "etc/mongooseim.cfg"}]} ]}]}
]}.
{plugins,
[
%% This plugin dowloads zips from github and caches them
%% This plugin is totally optional and everything would work without it (just slower)
{rebar_faster_deps, {git, "https://github.com/arcusfelis/rebar3-faster-deps-plugin.git",
{ref, "425c75af169f40b9c1c9e471b941175c4530374f"}}},
{pc, {git, "https://github.com/blt/port_compiler.git", {ref, "c2f3fb1"}}},
{provider_asn1, {git, "https://github.com/knusbaum/provider_asn1.git", {ref, "29f7850"}}},
{rebar3_codecov, {git, "https://github.com/zofpolkowska/rebar3_codecov.git", {ref, "b539c5c"}}},
{rebar3_lint, {git, "https://github.com/project-fifo/rebar3_lint.git", {tag, "0.1.2"}}}
]}.
{provider_hooks,
[{pre, [{compile, {asn, compile}}, {compile, {pc, compile}}]},
{post, [{clean, {asn, clean}}, {clean, {pc, clean}}]
}]}.
{overrides,
[{override, syslog,
[ {provider_hooks,
[ {post, [ {compile, {pc, compile}},
{clean, {pc, clean}} ] }] } ]},
{override, stringprep,
[ {provider_hooks,
[ {post, [ {compile, {pc, compile}},
{clean, {pc, clean}} ] }] } ]},
%% Disable unsupported plugins for hamcrest-erlang
{override, riakc, [{erl_opts, [debug_info,
{d, namespaced_types},
{d, deprecated_now},
{d, deprecated_19}]}]},
{override, hamcrest, [{plugins, []}]},
{del, eper, [{erl_opts, [warnings_as_errors]}]},
%% Erlang JWT Library is in elixir and wants elvis for tests
%% Remove elvis plugin to reduce deps
{override, jwerl, [{plugins, [rebar3_elixir, rebar3_hex]}]}
]}.
{dialyzer, [{plt_extra_apps, [cowboy, lasse, p1_utils, ranch, gen_fsm_compat, epgsql]}]}.
{cover_enabled, true}.
{cover_print_enabled, true}.
{cover_export_enabled, true}.
{codecov_opts,
[
%% Assuming /tmp/mongoose_combined.coverdata
{path, ["/tmp", "_build/test/cover"]}
]}.