dgiot/rebar.config
2021-05-14 07:28:48 +08:00

132 lines
3.5 KiB
Erlang

%% NOTE: Order of the deps matters!
{elixir_deps, []}.
{deps,
[emqx,
emqx_retainer,
emqx_management,
emqx_dashboard,
emqx_bridge_mqtt,
emqx_web_hook,
emqx_recon,
emqx_rule_engine,
emqx_sasl
]}.
%% Added to deps list for 'cloud' profile
{cloud_deps,
[emqx_lua_hook,
emqx_statsd,
emqx_reloader,
emqx_psk_file,
emqx_extension_hook
]}.
{edge_deps, []}.
{relx,
[{include_src, false},
{extended_start_script, false},
{generate_start_script, false},
{sys_config, false},
{vm_args, false},
{release, {emqx, git_describe},
[kernel,
sasl,
crypto,
public_key,
asn1,
syntax_tools,
ssl,
jsx,
os_mon,
inets,
compiler,
runtime_tools,
cuttlefish,
emqx,
{mnesia, load},
{ekka, load},
{emqx_retainer, load},
{emqx_management, load},
{emqx_dashboard, load},
{emqx_bridge_mqtt, load},
{emqx_web_hook, load},
{emqx_recon, load},
{emqx_rule_engine, load},
{emqx_sasl, load}
]},
{overlay,
[{mkdir,"etc/"},
{mkdir,"log/"},
{mkdir,"data/"},
{mkdir,"data/mnesia"},
{mkdir,"data/configs"},
{mkdir,"data/scripts"},
{template,"bin/emqx_env","bin/emqx_env"},
{template,"bin/emqx","bin/emqx"},
{template,"bin/emqx_ctl","bin/emqx_ctl"},
{template,"bin/emqx.cmd","bin/emqx.cmd"},
{template,"bin/emqx_ctl.cmd","bin/emqx_ctl.cmd"},
{copy,"{{output_dir}}/../../conf/plugins","etc/"},
{template,"{{output_dir}}/../../conf/emqx.conf","etc/emqx.conf"},
{template,"{{output_dir}}/../../conf/ssl_dist.conf","etc/ssl_dist.conf"},
{template,"{{output_dir}}/../../conf/plugins/emqx_bridge_mqtt.conf", "etc/plugins/emqx_bridge_mqtt.conf"},
{template, "data/loaded_plugins.tmpl", "data/loaded_plugins"},
{template, "data/loaded_modules.tmpl", "data/loaded_modules"},
{copy,"{{output_dir}}/../../conf/acl.conf","etc/acl.conf"},
{copy,"bin/nodetool","bin/nodetool"},
{copy,"{{output_dir}}/../../conf/schema/emqx.schema","releases/{{rel_vsn}}/"},
{copy,"bin/install_upgrade_escript", "bin/install_upgrade_escript"},
{template,"{{output_dir}}/../../lib/emqx/etc/{{vm_args_file}}","etc/vm.args"},
{copy, "{{output_dir}}/../../lib/emqx/etc/certs","etc/"},
{copy, "{{output_dir}}/../../lib/cuttlefish/cuttlefish","bin/"}
]}
]}.
{elixir_relx_apps, []}.
{edge_relx_apps, []}.
{cloud_relx_apps,
[
{emqx_lua_hook, load},
{emqx_extension_hook, load},
{emqx_statsd, load},
{emqx_reloader, load},
{emqx_psk_file, load},
{observer, load},
luerl,
xmerl
]}.
{cloud_relx_overlay,
[{template,"{{output_dir}}/../../conf/plugins/emqx_psk_file.conf", "etc/plugins/emqx_psk_file.conf"},
{template,"{{output_dir}}/../../conf/plugins/emqx_extension_hook.conf", "etc/plugins/emqx_extension_hook.conf"},
{copy, "{{output_dir}}/../../lib/emqx_psk_file/etc/psk.txt", "etc/psk.txt"}
]}.
{edge_relx_overlay, []}.
{edoc_opts, [{preprocess,true}]}.
{erl_opts, [warn_unused_vars,warn_shadow_vars,warn_unused_import,
warn_obsolete_guard,no_debug_info,compressed]}.
{overrides, [{add, [{erl_opts, [no_debug_info, compressed]}]}]}.
{xref_checks, [undefined_function_calls,undefined_functions,locals_not_used,
deprecated_function_calls,warnings_as_errors,
deprecated_functions]}.
{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
{plugins, [rebar3_run]}.
{post_hooks,
[{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", compile, "./post-compile.sh"},
{"win32", compile, "post-compile.cmd"}
]}.