2023-12-20 01:46:51 +01:00
|
|
|
{Vars, ElixirApps} = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
|
2021-02-16 18:28:30 +01:00
|
|
|
{ok, Terms} ->
|
2021-03-14 22:33:30 +01:00
|
|
|
Backends = [mssql, mysql, odbc, pgsql, redis, sqlite],
|
|
|
|
EBs = lists:filter(fun(Backend) -> lists:member({Backend, true}, Terms) end, Backends),
|
2024-07-16 16:26:15 +02:00
|
|
|
Elixirs = case proplists:get_bool(elixir, Terms) of
|
|
|
|
true -> [elixir, logger, mix];
|
|
|
|
false -> []
|
2023-12-20 01:46:51 +01:00
|
|
|
end,
|
2024-02-20 17:30:37 +01:00
|
|
|
|
|
|
|
ProfileEnvironmentVariable = os:getenv("REBAR_PROFILE"),
|
|
|
|
AsProfiles = case lists:dropwhile(fun("as") -> false; (_) -> true end,
|
|
|
|
init:get_plain_arguments()) of
|
|
|
|
["as", Profiles | _] -> string:split(Profiles, ",");
|
|
|
|
_ -> []
|
|
|
|
end,
|
|
|
|
Terms2 = case lists:member("dev", [ProfileEnvironmentVariable | AsProfiles]) of
|
|
|
|
true -> lists:keystore(tools, 1, Terms, {tools, true});
|
|
|
|
false -> Terms
|
|
|
|
end,
|
|
|
|
Tools = case lists:keyfind(tools, 1, Terms2) of
|
|
|
|
{tools, true} -> [observer];
|
2024-01-08 14:54:10 +01:00
|
|
|
_ -> []
|
|
|
|
end,
|
2024-02-20 17:30:37 +01:00
|
|
|
|
2023-12-20 01:46:51 +01:00
|
|
|
{[lists:keyfind(description, 1, Terms),
|
2021-03-02 18:50:48 +01:00
|
|
|
lists:keyfind(vsn, 1, Terms),
|
2021-03-14 22:33:30 +01:00
|
|
|
{env, [{enabled_backends, EBs}]}
|
2024-01-08 14:54:10 +01:00
|
|
|
], Elixirs ++ Tools};
|
2021-02-16 18:28:30 +01:00
|
|
|
_Err ->
|
2023-12-20 01:46:51 +01:00
|
|
|
{[], []}
|
2021-02-16 18:28:30 +01:00
|
|
|
end,
|
|
|
|
|
|
|
|
{application, ejabberd,
|
2021-03-02 18:50:48 +01:00
|
|
|
Vars ++
|
|
|
|
[{modules, []},
|
2021-02-16 18:28:30 +01:00
|
|
|
{registered, []},
|
2022-07-27 11:47:16 +02:00
|
|
|
{applications, [kernel, sasl, ssl, stdlib, syntax_tools]},
|
2021-02-16 18:28:30 +01:00
|
|
|
{included_applications,
|
2022-02-08 12:12:49 +01:00
|
|
|
[compiler, inets, mnesia, os_mon,
|
2021-03-04 16:51:51 +01:00
|
|
|
cache_tab,
|
|
|
|
eimp,
|
|
|
|
fast_tls,
|
2021-06-25 12:32:40 +02:00
|
|
|
fast_xml,
|
2021-03-04 16:51:51 +01:00
|
|
|
fast_yaml,
|
2021-06-25 12:32:40 +02:00
|
|
|
p1_acme,
|
2021-02-16 18:28:30 +01:00
|
|
|
p1_utils,
|
|
|
|
pkix,
|
2021-06-25 12:32:40 +02:00
|
|
|
stringprep,
|
|
|
|
yconf,
|
2023-12-20 01:46:51 +01:00
|
|
|
xmpp | ElixirApps]},
|
2021-02-16 18:28:30 +01:00
|
|
|
{mod, {ejabberd_app, []}}]}.
|
|
|
|
|
|
|
|
%% Local Variables:
|
|
|
|
%% mode: erlang
|
|
|
|
%% End:
|
|
|
|
%% vim: set filetype=erlang tabstop=8:
|