Refactor pleroma_ctl copying to a generic function for copying files into the release dir
authorrinpatch <rinpatch@sdf.org>
Wed, 19 Jun 2019 00:51:59 +0000 (03:51 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 19 Jun 2019 00:52:03 +0000 (03:52 +0300)
mix.exs
rel/files/bin/pleroma_ctl [moved from rel/pleroma_ctl with 100% similarity]

diff --git a/mix.exs b/mix.exs
index df3253d5a6cf25138ab923e370161ab444d616da..781560a0a2b4f9097e6824403b8b222c60c08fe8 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -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
 
similarity index 100%
rename from rel/pleroma_ctl
rename to rel/files/bin/pleroma_ctl