mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Rebar3: Include Elixir files when making a release
This commit is contained in:
parent
2d067f7498
commit
dd5a198222
@ -125,6 +125,7 @@ ifeq ($(REBAR_ENABLE_ELIXIR),true)
|
||||
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
|
||||
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
|
||||
EXPLICIT_ELIXIR_COMPILE=MIX_ENV=default mix compile.elixir
|
||||
PREPARE_ELIXIR_SCRIPTS=mkdir rel/overlays; cp $(ELIXIR_LIBDIR_RAW)/../bin/iex rel/overlays/; cp $(ELIXIR_LIBDIR_RAW)/../bin/elixir rel/overlays/; sed -i 's|ERTS_BIN=$$|ERTS_BIN=$$SCRIPT_PATH/../../erts-{{erts_vsn}}/bin/|' rel/overlays/elixir
|
||||
endif
|
||||
ifeq "$(REBAR_VER)" "3"
|
||||
SKIPDEPS=
|
||||
@ -438,11 +439,13 @@ distclean: clean clean-rel
|
||||
rm -f vars.config
|
||||
|
||||
rel:
|
||||
$(PREPARE_ELIXIR_SCRIPTS)
|
||||
$(REBARREL)
|
||||
|
||||
DEV_CONFIG = _build/dev/rel/ejabberd/conf/ejabberd.yml
|
||||
|
||||
dev $(DEV_CONFIG):
|
||||
$(PREPARE_ELIXIR_SCRIPTS)
|
||||
$(REBARDEV)
|
||||
|
||||
TAGS:
|
||||
|
@ -255,6 +255,10 @@
|
||||
{template, "ejabberdctl.template", "bin/ejabberdctl"},
|
||||
{copy, "_build/default/lib/ejabberd/ebin/Elixir.*", "lib/ejabberd-{{release_version}}/ebin/"},
|
||||
{copy, "{{base_dir}}/consolidated/*", "lib/ejabberd-{{release_version}}/ebin/"},
|
||||
{copy, "rel/overlays/iex", "releases/{{release_version}}/"},
|
||||
{if_var_true, elixir,
|
||||
{template, "rel/overlays/elixir", "releases/{{release_version}}/elixir"}
|
||||
},
|
||||
{copy, "inetrc", "conf/inetrc"},
|
||||
{copy, "tools/captcha*.sh", "lib/ejabberd-\{\{release_version\}\}/priv/bin/"},
|
||||
{copy, "rel/files/install_upgrade.escript", "bin/install_upgrade.escript"}]}
|
||||
|
@ -1,13 +1,17 @@
|
||||
Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
|
||||
{Vars, ElixirApps} = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
|
||||
{ok, Terms} ->
|
||||
Backends = [mssql, mysql, odbc, pgsql, redis, sqlite],
|
||||
EBs = lists:filter(fun(Backend) -> lists:member({Backend, true}, Terms) end, Backends),
|
||||
[lists:keyfind(description, 1, Terms),
|
||||
Elixirs = case lists:keyfind(elixir, 1, Terms) of
|
||||
{elixir, true} -> [elixir, iex, logger, mix];
|
||||
_ -> []
|
||||
end,
|
||||
{[lists:keyfind(description, 1, Terms),
|
||||
lists:keyfind(vsn, 1, Terms),
|
||||
{env, [{enabled_backends, EBs}]}
|
||||
];
|
||||
], Elixirs};
|
||||
_Err ->
|
||||
[]
|
||||
{[], []}
|
||||
end,
|
||||
|
||||
{application, ejabberd,
|
||||
@ -27,7 +31,7 @@ Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.co
|
||||
pkix,
|
||||
stringprep,
|
||||
yconf,
|
||||
xmpp]},
|
||||
xmpp | ElixirApps]},
|
||||
{mod, {ejabberd_app, []}}]}.
|
||||
|
||||
%% Local Variables:
|
||||
|
Loading…
Reference in New Issue
Block a user