|
|
@@ -1,73 +1,38 @@
|
|
|
+%% This config file is the very basic config to compile emqx
|
|
|
+%% This allows emqx to be used as a dependency for other applications
|
|
|
+%% such as emqx module/plugin develpments and tests.
|
|
|
+
|
|
|
+%% With the help of EMQ's rebar3 fork, the config is extended
|
|
|
+%% with rebar.config.erl module. Final result is written to
|
|
|
+%% rebar.config.rendered if environment DEBUG is set.
|
|
|
+
|
|
|
{minimum_otp_vsn, "21.3"}.
|
|
|
-{plugins,[ {relup_helper,{git,"https://github.com/emqx/relup_helper", {branch,"master"}}}
|
|
|
- , {coveralls, {git, "https://github.com/emqx/coveralls-erl", {branch, "github"}}}
|
|
|
- ]}.
|
|
|
-{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]}.
|
|
|
+{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,deterministic,
|
|
|
{parse_transform,mod_vsn}]}]}]}.
|
|
|
+
|
|
|
{xref_checks,[undefined_function_calls,undefined_functions,locals_not_used,
|
|
|
- deprecated_function_calls,warnings_as_errors,
|
|
|
- deprecated_functions]}.
|
|
|
-{dialyzer, [{warnings, [unmatched_returns, error_handling, race_conditions]}
|
|
|
- ]}.
|
|
|
-{cover_enabled,true}.
|
|
|
-{cover_opts,[verbose]}.
|
|
|
-{cover_export_enabled,true}.
|
|
|
-{provider_hooks,[{pre,[{release,{relup_helper,gen_appups}}]},
|
|
|
- {post,[{release,{relup_helper,otp_vsn}},
|
|
|
- {release,{relup_helper,untar}}]}]}.
|
|
|
-{post_hooks,[]}.
|
|
|
-{erl_first_files, ["src/emqx_logger.erl"]}.
|
|
|
+ deprecated_function_calls,warnings_as_errors, deprecated_functions]}.
|
|
|
|
|
|
-"${COVERALL_CONFIGS}".
|
|
|
+{dialyzer, [{warnings, [unmatched_returns, error_handling, race_conditions]}]}.
|
|
|
|
|
|
-{deps, ["${BASIC_DEPS}"]}.
|
|
|
+{cover_enabled, true}.
|
|
|
+{cover_opts, [verbose]}.
|
|
|
+{cover_export_enabled, true}.
|
|
|
|
|
|
-{profiles,
|
|
|
- [{'emqx',
|
|
|
- [{relx,
|
|
|
- ["${BASIC_RELX_PARAMS}",
|
|
|
- {release, {emqx, "${GIT_DESC}"}, ["${BASIC_RELX_APPS}", "${CLOUD_RELX_APPS}"]},
|
|
|
- {overlay, ["${BASIC_OVERLAYS}", "${CLOUD_OVERLAYS}"]},
|
|
|
- {overlay_vars,["vars/vars-cloud.config","vars/vars-bin.config"]}]}]},
|
|
|
- {'emqx-pkg',
|
|
|
- [{relx,
|
|
|
- ["${BASIC_RELX_PARAMS}",
|
|
|
- {release, {emqx, "${GIT_DESC}"}, ["${BASIC_RELX_APPS}", "${CLOUD_RELX_APPS}"]},
|
|
|
- {overlay, ["${BASIC_OVERLAYS}", "${CLOUD_OVERLAYS}"]},
|
|
|
- {overlay_vars,["vars/vars-cloud.config","vars/vars-pkg.config"]}]}]},
|
|
|
- {'emqx-edge',
|
|
|
- [{relx,
|
|
|
- ["${BASIC_RELX_PARAMS}",
|
|
|
- {release, {emqx, "${GIT_DESC}"}, ["${BASIC_RELX_APPS}"]},
|
|
|
- {overlay, ["${BASIC_OVERLAYS}", "${EDGE_OVERLAYS}"]},
|
|
|
- {overlay_vars,["vars/vars-edge.config","vars/vars-bin.config"]}]}]},
|
|
|
- {'emqx-edge-pkg',
|
|
|
- [{relx,
|
|
|
- ["${BASIC_RELX_PARAMS}",
|
|
|
- {release, {emqx, "${GIT_DESC}"}, ["${BASIC_RELX_APPS}"]},
|
|
|
- {overlay, ["${BASIC_OVERLAYS}", "${EDGE_OVERLAYS}"]},
|
|
|
- {overlay_vars,["vars/vars-edge.config","vars/vars-pkg.config"]}]}]},
|
|
|
- {test,
|
|
|
- [{deps,
|
|
|
- [ {bbmustache, "1.10.0"},
|
|
|
- {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.2.0"}}},
|
|
|
- {emqx_ct_helpers, {git, "https://github.com/emqx/emqx-ct-helpers", {tag, "1.3.0"}}},
|
|
|
- meck
|
|
|
- ]},
|
|
|
- {erl_opts, [debug_info]}
|
|
|
- ]}
|
|
|
- ]}.
|
|
|
+{provider_hooks,[{pre,[{release,{relup_helper,gen_appups}}]},
|
|
|
+ {post,[{release,{relup_helper,otp_vsn}},
|
|
|
+ {release,{relup_helper,untar}}
|
|
|
+ ]}]}.
|
|
|
+
|
|
|
+{post_hooks,[]}.
|
|
|
|
|
|
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
-%%% Placeholders
|
|
|
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
-{placeholders, [
|
|
|
+{erl_first_files, ["src/emqx_logger.erl"]}.
|
|
|
|
|
|
- {"BASIC_DEPS", elems,
|
|
|
+{deps,
|
|
|
[ {gproc, {git, "https://github.com/uwiger/gproc", {tag, "0.8.0"}}}
|
|
|
, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}
|
|
|
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.7.1"}}}
|
|
|
@@ -83,118 +48,4 @@
|
|
|
, {emqtt, {git, "https://github.com/emqx/emqtt", {tag, "1.2.0"}}}
|
|
|
, {rulesql, {git, "https://github.com/emqx/rulesql", {tag, "0.1.2"}}}
|
|
|
, {getopt, "1.0.1"}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"BASIC_RELX_PARAMS", elems,
|
|
|
- [ {include_src,false}
|
|
|
- , {extended_start_script,false}
|
|
|
- , {generate_start_script,false}
|
|
|
- , {sys_config,false}
|
|
|
- , {vm_args,false}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"BASIC_RELX_APPS", elems,
|
|
|
- [ kernel
|
|
|
- , sasl
|
|
|
- , crypto
|
|
|
- , public_key
|
|
|
- , asn1
|
|
|
- , syntax_tools
|
|
|
- , ssl
|
|
|
- , 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_sn, load}
|
|
|
- , {emqx_coap, load}
|
|
|
- , {emqx_stomp, load}
|
|
|
- , {emqx_auth_http, load}
|
|
|
- , {emqx_auth_mysql, load}
|
|
|
- , {emqx_auth_jwt, load}
|
|
|
- , {emqx_auth_mnesia, load}
|
|
|
- , {emqx_web_hook, load}
|
|
|
- , {emqx_recon, load}
|
|
|
- , {emqx_rule_engine, load}
|
|
|
- , {emqx_sasl, load}
|
|
|
- , {emqx_telemetry, load}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"CLOUD_RELX_APPS", elems,
|
|
|
- [ {emqx_lwm2m, load}
|
|
|
- , {emqx_auth_ldap, load}
|
|
|
- , {emqx_auth_pgsql, load}
|
|
|
- , {emqx_auth_redis, load}
|
|
|
- , {emqx_auth_mongo, load}
|
|
|
- , {emqx_lua_hook, load}
|
|
|
- , {emqx_exhook, load}
|
|
|
- , {emqx_exproto, load}
|
|
|
- , {emqx_prometheus, load}
|
|
|
- , {emqx_psk_file, load}
|
|
|
- , {emqx_plugin_template, load}
|
|
|
- , {observer, load}
|
|
|
- , luerl
|
|
|
- , xmerl
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"BASIC_OVERLAYS", elems,
|
|
|
- [ {mkdir,"etc/"}
|
|
|
- , {mkdir,"etc/emqx.d/"}
|
|
|
- , {mkdir,"log/"}
|
|
|
- , {mkdir,"data/"}
|
|
|
- , {mkdir,"data/mnesia"}
|
|
|
- , {mkdir,"data/configs"}
|
|
|
- , {mkdir,"data/scripts"}
|
|
|
- , {template, "data/loaded_plugins.tmpl", "data/loaded_plugins"}
|
|
|
- , {template, "data/loaded_modules.tmpl", "data/loaded_modules"}
|
|
|
- , {template,"data/emqx_vars","releases/emqx_vars"}
|
|
|
- , {copy,"_build/default/lib/cuttlefish/cuttlefish","bin/"}
|
|
|
- , {copy,"bin/*","bin/"}
|
|
|
- , {template,"etc/*.conf","etc/"}
|
|
|
- , {template,"etc/emqx.d/*.conf","etc/emqx.d/"}
|
|
|
- , {copy,"priv/emqx.schema","releases/{{rel_vsn}}/"}
|
|
|
- , {copy, "etc/certs","etc/"}
|
|
|
- , "${RELUP_OVERLAYS}"
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"RELUP_OVERLAYS", elems,
|
|
|
- [ {copy,"bin/emqx.cmd","bin/emqx.cmd-{{rel_vsn}}"}
|
|
|
- , {copy,"bin/emqx_ctl.cmd","bin/emqx_ctl.cmd-{{rel_vsn}}"}
|
|
|
- , {copy,"bin/emqx","bin/emqx-{{rel_vsn}}"}
|
|
|
- , {copy,"bin/emqx_ctl","bin/emqx_ctl-{{rel_vsn}}"}
|
|
|
- , {copy,"bin/install_upgrade.escript", "bin/install_upgrade.escript-{{rel_vsn}}"}
|
|
|
- , {copy,"bin/nodetool","bin/nodetool-{{rel_vsn}}"}
|
|
|
- , {copy,"_build/default/lib/cuttlefish/cuttlefish","bin/cuttlefish-{{rel_vsn}}"}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"CLOUD_OVERLAYS", elems,
|
|
|
- [ {template,"etc/emqx_cloud.d/*.conf","etc/emqx.d/"}
|
|
|
- , {template,"etc/emqx_cloud.d/vm.args","etc/vm.args"}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"EDGE_OVERLAYS", elems,
|
|
|
- [ {template,"etc/emqx_edge.d/*.conf","etc/emqx.d/"}
|
|
|
- , {template,"etc/emqx_edge.d/vm.args.edge","etc/vm.args"}
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {"GIT_DESC", var, fun mod_project:get_vsn/1},
|
|
|
-
|
|
|
- {"COVERALL_CONFIGS", elems, fun mod_project:coveralls_configs/1}
|
|
|
-
|
|
|
-]}.
|
|
|
-
|
|
|
+ ]}.
|