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: [
include_executables_for: [:unix],
applications: [ex_syslogger: :load, syslog: :load],
steps: [:assemble, &copy_pleroma_ctl/1]
steps: [:assemble, &copy_files/1]
]
]
]
end
def copy_pleroma_ctl(%{path: target_path} = release) do
File.cp!("./rel/pleroma_ctl", Path.join([target_path, "bin", "pleroma_ctl"]))
def copy_files(%{path: target_path} = release) do
File.cp_r!("./rel/files", target_path)
release
end