mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Copy include/ files for ejabberd, deps and otp, as "mix release" lacks that
This commit is contained in:
parent
74e86611ab
commit
f61f5beb5b
15
mix.exs
15
mix.exs
@ -301,6 +301,21 @@ defmodule Ejabberd.MixProject do
|
||||
Mix.Generator.copy_file("sql/#{x}", "#{ro}/lib/ejabberd-#{release.version}/priv/sql/#{x}")
|
||||
end)
|
||||
|
||||
File.cp_r!("include", "#{ro}/lib/ejabberd-#{release.version}/include")
|
||||
for {name, details} <- Map.to_list(release.applications) do
|
||||
{_, is_otp_app} = List.keyfind(details, :otp_app?, 0)
|
||||
{_, vsn} = List.keyfind(details, :vsn, 0)
|
||||
{_, path} = List.keyfind(details, :path, 0)
|
||||
source_dir = case is_otp_app do
|
||||
:true -> "#{path}/include"
|
||||
:false -> "deps/#{name}/include"
|
||||
end
|
||||
target_dir = "#{ro}/lib/#{name}-#{vsn}/include"
|
||||
File.exists?(source_dir)
|
||||
&& File.mkdir_p(target_dir)
|
||||
&& File.cp_r!(source_dir, target_dir)
|
||||
end
|
||||
|
||||
Mix.Generator.create_directory("#{ro}/var/lib/ejabberd")
|
||||
|
||||
case Mix.env() do
|
||||
|
Loading…
Reference in New Issue
Block a user