Refactor pleroma_ctl copying to a generic function for copying files into the release dir

This commit is contained in:
rinpatch 2019-06-19 03:51:59 +03:00
parent 3d76420512
commit a0a1361888
2 changed files with 3 additions and 3 deletions

View File

@ -37,14 +37,14 @@ defmodule Pleroma.Mixfile do
pleroma: [ pleroma: [
include_executables_for: [:unix], include_executables_for: [:unix],
applications: [ex_syslogger: :load, syslog: :load], applications: [ex_syslogger: :load, syslog: :load],
steps: [:assemble, &copy_pleroma_ctl/1] steps: [:assemble, &copy_files/1]
] ]
] ]
] ]
end end
def copy_pleroma_ctl(%{path: target_path} = release) do def copy_files(%{path: target_path} = release) do
File.cp!("./rel/pleroma_ctl", Path.join([target_path, "bin", "pleroma_ctl"])) File.cp_r!("./rel/files", target_path)
release release
end end