forked from vernemq/vernemq
-
Notifications
You must be signed in to change notification settings - Fork 5
/
rebar.config
200 lines (181 loc) · 7.87 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
188
189
190
191
192
193
194
195
196
197
198
199
200
%%-*- mode: erlang -*-
{minimum_otp_vsn, "21.2"}.
{erl_opts, [
debug_info,
fail_on_warning,
{i, "./_build/default/plugins/gpb/include/"},
{i, "./_build/default/lib/vmq_proto/include/"},
{platform_define, "20|21|22|23|24", nowarn_gen_fsm},
{platform_define, "^(R|1|20)", fun_stacktrace}
]}.
{edoc_opts, [{preprocess, true}]}.
{project_plugins, [
{rebar3_cuttlefish,
{git, "https://github.com/vernemq/rebar3_cuttlefish",
{ref, "389c7bda06e452884a5d564270158c5f6fe7c0e2"}}},
erlfmt
]}.
{plugins, [{rebar3_gpb_plugin, "2.21.0"}]}.
{dialyzer, [
{exclude_mods, [vmq_plugin]},
{plt_location, "plts"},
{base_plt_location, "plts_base"}
]}.
{erlfmt, [
write,
{print_width, 100},
{files, [
"apps/*/{src,include}/*.{erl,hrl,app.src,config}",
"apps/*/rebar.config",
"rebar.config",
"vars.config",
"pkg.vars.config"
]},
{exclude_files, []}
]}.
{deps, [
{recon, "2.5.1"},
{lager, "3.8.0"},
{stdout_formatter, "0.2.3"},
%% use specific cuttlefish commit until either 2.2.1 or 2.3.0 is relased.
{cuttlefish, {git, "https://github.com/Kyorai/cuttlefish.git", {tag, "v2.3.0"}}},
{vernemq_dev, {git, "https://github.com/gojekfarm/vernemq_dev.git", {branch, "master"}}},
{syslog, "1.1.0"},
{lager_syslog, {git, "https://github.com/basho/lager_syslog.git", {branch, "develop-3.0"}}},
%% remove once clique hex package 3.0.2 is released
{clique, {git, "https://github.com/vernemq/clique.git", {branch, "rel_0.3.6-verne"}}}
]}.
{overrides, [
%% overrides to get it compiling on OTP 21
{override, clique, [{erl_opts, [debug_info]}]}
]}.
{cover_enabled, true}.
{profiles, [
% This branch eleveldb (rpi-32) is not supported for ARM64 (apple silicon).
% {rpi32, [
% {deps, [
% {eleveldb, {git, "https://github.com/vernemq/eleveldb.git", {branch, "rpi-32"}}}
% ]},
% %% Make sure the release generation can find the schema files is
% %% it's looking in the default folder.
% {pre_hooks, [{release, "ln -sf ../../rpi32/lib/eleveldb _build/default/lib/"}]}
% ]},
{all_tests, [
{erl_opts, [
{d, run_all_tests, true}
]}
]}
]}.
{cuttlefish, [
{schema_dir, "lib"},
{schema_discovery, false}
]}.
{relx, [
{release, {vernemq, semver}, [
sasl,
inets,
xmerl,
vmq_server,
vernemq_dev,
{cuttlefish, load},
{vmq_plumtree, load},
{plumtree, load},
{vmq_passwd, load},
{vmq_acl, load},
{vmq_bridge, load},
{vmq_diversity, load},
{vmq_webhooks, load},
{vmq_proto, load},
{vmq_swc, load},
{vmq_pulse, load},
{recon, load},
{syslog, load},
{lager_syslog, load},
{runtime_tools, load},
{tools, load},
{mcd, load},
{vmq_mqtt5_demo_plugin, load},
{jwerl, load},
{shackle, load}
]},
% the vars.generated is created by the Makefile
{overlay_vars, "vars.generated"},
{dev_mode, false},
{include_erts, true},
{include_src, false},
% we're using the runner from files/runner (ex. node_package)
{extended_start_script, false},
{overlay, [
{mkdir, "data/broker"},
{mkdir, "data/msgstore"},
{mkdir, "log/sasl"},
{copy, "_build/default/bin/psql_migration", "bin/psql_migration"},
{copy, "migrations/", "./"},
{template, "files/vmq-admin", "bin/vmq-admin"},
{template, "files/runner", "bin/vernemq"},
{template, "files/env.sh", "lib/env.sh"},
{copy, "3rd-party-licenses.txt", "share/3rd-party-licenses.txt"},
{copy, "files/nodetool", "erts-{{erts_vsn}}/bin/nodetool"},
{copy, "_build/default/bin/cuttlefish", "erts-{{erts_vsn}}/bin/cuttlefish"},
{copy, "apps/vmq_acl/priv/default.acl", "etc/vmq.acl"},
{copy, "apps/vmq_server/priv/vmq.trie", "etc/vmq.trie"},
{copy, "apps/vmq_passwd/priv/vmq_passwd", "bin/vmq-passwd"},
%% the runner script expects vernemq.boot and vernemq.script instead of the default start.boot/.script
{copy, "_build/default/rel/vernemq/releases/{{release_version}}/start.boot",
"releases/{{release_version}}/vernemq.boot"},
{copy, "_build/default/rel/vernemq/releases/{{release_version}}/start.script",
"releases/{{release_version}}/vernemq.script"},
%% Cuttlefish Schema Files have a priority order.
%% Anything in a file prefixed with 00- will override
%% anything in a file with a higher numbered prefix.
%%
%% Please only use 0[0-9]-*.schema for development purposes
{template, "apps/vmq_server/priv/vmq_server.schema", "share/schema/10-vmq_server.schema"},
{template, "apps/vmq_plugin/priv/vmq_plugin.schema", "share/schema/12-vmq_plugin.schema"},
{template, "apps/vmq_acl/priv/vmq_acl.schema", "share/schema/13-vmq_acl.schema"},
{template, "apps/vmq_passwd/priv/vmq_passwd.schema", "share/schema/14-vmq_passwd.schema"},
{template, "apps/vmq_diversity/priv/vmq_diversity.schema",
"share/schema/15-vmq_diversity.schema"},
{template, "apps/vmq_diversity/priv/vmq_bcrypt.schema",
"share/schema/16-vmq_bcrypt.schema"},
{copy, "apps/vmq_diversity/priv/init.lua", "share/lua/init.lua"},
{copy, "apps/vmq_diversity/priv/auth", "share/lua/"},
{template, "apps/vmq_events_sidecar/priv/vmq_events_sidecar.schema",
"share/schema/17-vmq_events_sidecar.schema"},
{template, "apps/vmq_webhooks/priv/vmq_webhooks.schema",
"share/schema/18-vmq_webhooks.schema"},
{template, "apps/vmq_bridge/priv/vmq_bridge.schema", "share/schema/19-vmq_bridge.schema"},
{template, "apps/vmq_swc/priv/vmq_swc.schema", "share/schema/20-vmq_swc.schema"},
{template, "apps/vmq_pulse/priv/vmq_pulse.schema", "share/schema/21-vmq_pulse.schema"},
{template, "apps/vmq_enhanced_auth/priv/vmq_enhanced_auth.schema",
"share/schema/22-vmq_enhanced_auth.schema"},
{template, "apps/vmq_metrics_plus/priv/vmq_metrics_plus.schema",
"share/schema/23-vmq_metrics_plus.schema"},
{template, "files/vmq.schema", "share/schema/30-vmq.schema"},
{template, "_build/default/lib/cuttlefish/priv/erlang_vm.schema",
"share/schema/31-erlang_vm.schema"},
{template, "_build/default/lib/riak_sysmon/priv/riak_sysmon.schema",
"share/schema/32-riak_sysmon.schema"},
{template, "_build/default/lib/eleveldb/priv/eleveldb.schema",
"share/schema/33-eleveldb.schema"},
{mkdir, "lib/erlio-patches"},
{copy, "apps/vmq_server/priv/lua_scripts/delete_subscriber.lua",
"etc/lua/delete_subscriber.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/remap_subscriber.lua",
"etc/lua/remap_subscriber.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/subscribe.lua", "etc/lua/subscribe.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/unsubscribe.lua", "etc/lua/unsubscribe.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/fetch_matched_topic_subscribers.lua",
"etc/lua/fetch_matched_topic_subscribers.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/fetch_subscriber.lua",
"etc/lua/fetch_subscriber.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/enqueue_msg.lua", "etc/lua/enqueue_msg.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/poll_main_queue.lua",
"etc/lua/poll_main_queue.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/get_live_nodes.lua", "etc/lua/get_live_nodes.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/migrate_offline_queue.lua",
"etc/lua/migrate_offline_queue.lua"},
{copy, "apps/vmq_server/priv/lua_scripts/reap_subscribers.lua",
"etc/lua/reap_subscribers.lua"}
]}
]}.