ci(rocksdb): conditionally load mnesia_rocksdb in release
Otherwise, it might not be included in the release, since it's no longer declared as a dependency on the mria app.
This commit is contained in:
parent
f5d63c1555
commit
1ef898d126
72
mix.exs
72
mix.exs
|
@ -170,35 +170,40 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
hocon: :load,
|
hocon: :load,
|
||||||
emqx: :load,
|
emqx: :load,
|
||||||
emqx_conf: :load,
|
emqx_conf: :load,
|
||||||
emqx_machine: :permanent,
|
emqx_machine: :permanent
|
||||||
mria: :load,
|
|
||||||
mnesia: :load,
|
|
||||||
ekka: :load,
|
|
||||||
emqx_plugin_libs: :load,
|
|
||||||
esasl: :load,
|
|
||||||
observer_cli: :permanent,
|
|
||||||
system_monitor: :load,
|
|
||||||
emqx_http_lib: :permanent,
|
|
||||||
emqx_resource: :permanent,
|
|
||||||
emqx_connector: :permanent,
|
|
||||||
emqx_authn: :permanent,
|
|
||||||
emqx_authz: :permanent,
|
|
||||||
emqx_auto_subscribe: :permanent,
|
|
||||||
emqx_gateway: :permanent,
|
|
||||||
emqx_exhook: :permanent,
|
|
||||||
emqx_bridge: :permanent,
|
|
||||||
emqx_rule_engine: :permanent,
|
|
||||||
emqx_modules: :permanent,
|
|
||||||
emqx_management: :permanent,
|
|
||||||
emqx_dashboard: :permanent,
|
|
||||||
emqx_retainer: :permanent,
|
|
||||||
emqx_statsd: :permanent,
|
|
||||||
emqx_prometheus: :permanent,
|
|
||||||
emqx_psk: :permanent,
|
|
||||||
emqx_slow_subs: :permanent,
|
|
||||||
emqx_plugins: :permanent,
|
|
||||||
emqx_mix: :none
|
|
||||||
] ++
|
] ++
|
||||||
|
if(enable_rocksdb?(),
|
||||||
|
do: [mnesia_rocksdb: :load],
|
||||||
|
else: []
|
||||||
|
) ++
|
||||||
|
[
|
||||||
|
mnesia: :load,
|
||||||
|
ekka: :load,
|
||||||
|
emqx_plugin_libs: :load,
|
||||||
|
esasl: :load,
|
||||||
|
observer_cli: :permanent,
|
||||||
|
system_monitor: :load,
|
||||||
|
emqx_http_lib: :permanent,
|
||||||
|
emqx_resource: :permanent,
|
||||||
|
emqx_connector: :permanent,
|
||||||
|
emqx_authn: :permanent,
|
||||||
|
emqx_authz: :permanent,
|
||||||
|
emqx_auto_subscribe: :permanent,
|
||||||
|
emqx_gateway: :permanent,
|
||||||
|
emqx_exhook: :permanent,
|
||||||
|
emqx_bridge: :permanent,
|
||||||
|
emqx_rule_engine: :permanent,
|
||||||
|
emqx_modules: :permanent,
|
||||||
|
emqx_management: :permanent,
|
||||||
|
emqx_dashboard: :permanent,
|
||||||
|
emqx_retainer: :permanent,
|
||||||
|
emqx_statsd: :permanent,
|
||||||
|
emqx_prometheus: :permanent,
|
||||||
|
emqx_psk: :permanent,
|
||||||
|
emqx_slow_subs: :permanent,
|
||||||
|
emqx_plugins: :permanent,
|
||||||
|
emqx_mix: :none
|
||||||
|
] ++
|
||||||
if(enable_quicer?(), do: [quicer: :permanent], else: []) ++
|
if(enable_quicer?(), do: [quicer: :permanent], else: []) ++
|
||||||
if(enable_bcrypt?(), do: [bcrypt: :permanent], else: []) ++
|
if(enable_bcrypt?(), do: [bcrypt: :permanent], else: []) ++
|
||||||
if(enable_jq?(), do: [jq: :permanent], else: []) ++
|
if(enable_jq?(), do: [jq: :permanent], else: []) ++
|
||||||
|
@ -616,6 +621,11 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
]) or "1" == System.get_env("BUILD_WITH_QUIC")
|
]) or "1" == System.get_env("BUILD_WITH_QUIC")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp enable_rocksdb?() do
|
||||||
|
not build_without_rocksdb?() or
|
||||||
|
"1" == System.get_env("BUILD_WITH_QUIC")
|
||||||
|
end
|
||||||
|
|
||||||
defp pkg_vsn() do
|
defp pkg_vsn() do
|
||||||
%{edition_type: edition_type} = check_profile!()
|
%{edition_type: edition_type} = check_profile!()
|
||||||
basedir = Path.dirname(__ENV__.file)
|
basedir = Path.dirname(__ENV__.file)
|
||||||
|
@ -657,6 +667,12 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
String.downcase(opt) != "false"
|
String.downcase(opt) != "false"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp build_without_rocksdb?() do
|
||||||
|
opt = System.get_env("BUILD_WITHOUT_ROCKSDB", "false")
|
||||||
|
|
||||||
|
String.downcase(opt) != "false"
|
||||||
|
end
|
||||||
|
|
||||||
defp from_rebar_to_eex_template(str) do
|
defp from_rebar_to_eex_template(str) do
|
||||||
# we must not consider surrounding space in the template var name
|
# we must not consider surrounding space in the template var name
|
||||||
# because some help strings contain informative variables that
|
# because some help strings contain informative variables that
|
||||||
|
|
|
@ -88,6 +88,10 @@ is_quicer_supported() ->
|
||||||
is_win32() orelse is_centos_6()) orelse
|
is_win32() orelse is_centos_6()) orelse
|
||||||
"1" == os:getenv("BUILD_WITH_QUIC").
|
"1" == os:getenv("BUILD_WITH_QUIC").
|
||||||
|
|
||||||
|
is_rocksdb_supported() ->
|
||||||
|
not (false =/= os:getenv("BUILD_WITHOUT_ROCKSDB")) orelse
|
||||||
|
"1" == os:getenv("BUILD_WITH_ROCKSDB").
|
||||||
|
|
||||||
is_macos() ->
|
is_macos() ->
|
||||||
{unix, darwin} =:= os:type().
|
{unix, darwin} =:= os:type().
|
||||||
|
|
||||||
|
@ -318,34 +322,37 @@ relx_apps(ReleaseType, Edition) ->
|
||||||
% started by emqx_machine
|
% started by emqx_machine
|
||||||
{emqx, load},
|
{emqx, load},
|
||||||
{emqx_conf, load},
|
{emqx_conf, load},
|
||||||
emqx_machine,
|
emqx_machine
|
||||||
{mnesia, load},
|
|
||||||
{ekka, load},
|
|
||||||
{emqx_plugin_libs, load},
|
|
||||||
{esasl, load},
|
|
||||||
observer_cli,
|
|
||||||
% started by emqx_machine
|
|
||||||
{system_monitor, load},
|
|
||||||
emqx_http_lib,
|
|
||||||
emqx_resource,
|
|
||||||
emqx_connector,
|
|
||||||
emqx_authn,
|
|
||||||
emqx_authz,
|
|
||||||
emqx_auto_subscribe,
|
|
||||||
emqx_gateway,
|
|
||||||
emqx_exhook,
|
|
||||||
emqx_bridge,
|
|
||||||
emqx_rule_engine,
|
|
||||||
emqx_modules,
|
|
||||||
emqx_management,
|
|
||||||
emqx_dashboard,
|
|
||||||
emqx_retainer,
|
|
||||||
emqx_statsd,
|
|
||||||
emqx_prometheus,
|
|
||||||
emqx_psk,
|
|
||||||
emqx_slow_subs,
|
|
||||||
emqx_plugins
|
|
||||||
] ++
|
] ++
|
||||||
|
[{mnesia_rocksdb, load} || is_rocksdb_supported()] ++
|
||||||
|
[
|
||||||
|
{mnesia, load},
|
||||||
|
{ekka, load},
|
||||||
|
{emqx_plugin_libs, load},
|
||||||
|
{esasl, load},
|
||||||
|
observer_cli,
|
||||||
|
% started by emqx_machine
|
||||||
|
{system_monitor, load},
|
||||||
|
emqx_http_lib,
|
||||||
|
emqx_resource,
|
||||||
|
emqx_connector,
|
||||||
|
emqx_authn,
|
||||||
|
emqx_authz,
|
||||||
|
emqx_auto_subscribe,
|
||||||
|
emqx_gateway,
|
||||||
|
emqx_exhook,
|
||||||
|
emqx_bridge,
|
||||||
|
emqx_rule_engine,
|
||||||
|
emqx_modules,
|
||||||
|
emqx_management,
|
||||||
|
emqx_dashboard,
|
||||||
|
emqx_retainer,
|
||||||
|
emqx_statsd,
|
||||||
|
emqx_prometheus,
|
||||||
|
emqx_psk,
|
||||||
|
emqx_slow_subs,
|
||||||
|
emqx_plugins
|
||||||
|
] ++
|
||||||
[quicer || is_quicer_supported()] ++
|
[quicer || is_quicer_supported()] ++
|
||||||
[bcrypt || provide_bcrypt_release(ReleaseType)] ++
|
[bcrypt || provide_bcrypt_release(ReleaseType)] ++
|
||||||
[jq || is_jq_supported()] ++
|
[jq || is_jq_supported()] ++
|
||||||
|
|
Loading…
Reference in New Issue