fix(nodetool): add patches directory to head of path
This enables us to provide patches that affect `call_hocon` from `bin/emqx`.
This commit is contained in:
parent
727fd296ee
commit
bc0b0fe9e8
|
@ -357,6 +357,14 @@ add_libs_dir() ->
|
|||
{error, Reason} ->
|
||||
%% rel file was been deleted by release handler
|
||||
error({failed_to_read_RELEASES_file, RelFile, Reason})
|
||||
end,
|
||||
PatchesDir = filename:join([RootDir, "data", "patches"]),
|
||||
case filelib:is_dir(PatchesDir) of
|
||||
true ->
|
||||
true = code:add_patha(PatchesDir),
|
||||
ok;
|
||||
false ->
|
||||
ok
|
||||
end.
|
||||
|
||||
add_lib_dir(RootDir, Name, Vsn) ->
|
||||
|
|
|
@ -36,6 +36,8 @@ install: build
|
|||
mkdir -p debian/emqx/usr/lib/emqx/bin
|
||||
mkdir -p debian/emqx/usr/lib/emqx/plugins
|
||||
touch debian/emqx/usr/lib/emqx/plugins/.keep
|
||||
mkdir -p debian/emqx/usr/lib/emqx/data/patches
|
||||
touch debian/emqx/usr/lib/emqx/data/patches/.keep
|
||||
mkdir -p debian/emqx/etc/emqx
|
||||
cp bin/* debian/emqx/usr/lib/emqx/bin
|
||||
cp -R lib debian/emqx/usr/lib/emqx
|
||||
|
|
|
@ -40,6 +40,7 @@ EMQX, a distributed, massively scalable, highly extensible MQTT message broker.
|
|||
%install
|
||||
mkdir -p %{buildroot}%{_lib_home}
|
||||
mkdir -p %{buildroot}%{_lib_home}/plugins
|
||||
mkdir -p %{buildroot}%{_lib_home}/data/patches
|
||||
mkdir -p %{buildroot}%{_log_dir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_conf_dir}
|
||||
|
@ -48,6 +49,7 @@ mkdir -p %{buildroot}%{_var_home}
|
|||
|
||||
cp -R %{_reldir}/lib %{buildroot}%{_lib_home}/
|
||||
touch %{buildroot}%{_lib_home}/plugins/.keep
|
||||
touch %{buildroot}%{_lib_home}/data/patches/.keep
|
||||
cp -R %{_reldir}/erts-* %{buildroot}%{_lib_home}/
|
||||
cp -R %{_reldir}/releases %{buildroot}%{_lib_home}/
|
||||
cp -R %{_reldir}/bin %{buildroot}%{_lib_home}/
|
||||
|
|
Loading…
Reference in New Issue