Merge branch 'fix/config-gen-releases' into 'develop'
authorrinpatch <rinpatch@sdf.org>
Thu, 20 Jun 2019 21:25:34 +0000 (21:25 +0000)
committerrinpatch <rinpatch@sdf.org>
Thu, 20 Jun 2019 21:25:34 +0000 (21:25 +0000)
Refactor mix tasks a bit and make config generator work with releases

See merge request pleroma/pleroma!1312

1  2 
lib/mix/tasks/pleroma/config.ex

index d008871a1560b0c90931b418b9afc7e057f41d1c,4bbb42cead1cac6bd92601cd86e79399aec57ab4..cc54253624ea06d69a0edb21adc03df84f1a11cb
@@@ -37,13 -37,12 +37,13 @@@ defmodule Mix.Tasks.Pleroma.Config d
    end
  
    def run(["migrate_from_db", env]) do
-     Common.start_pleroma()
+     start_pleroma()
  
      if Pleroma.Config.get([:instance, :dynamic_configuration]) do
 -      config_path = "config/#{env}.migrated.secret.exs"
 +      config_path = "config/#{env}.exported_from_db.secret.exs"
  
        {:ok, file} = File.open(config_path, [:write])
 +      IO.write(file, "use Mix.Config\r\n")
  
        Repo.all(Config)
        |> Enum.each(fn config ->