diff --git a/lib/pleroma/release_tasks.ex b/lib/pleroma/release_tasks.ex index 1e06aafe4..a3fbde397 100644 --- a/lib/pleroma/release_tasks.ex +++ b/lib/pleroma/release_tasks.ex @@ -25,7 +25,7 @@ defp mix_task(task, args) do module = Module.split(module) match?(["Mix", "Tasks", "Pleroma" | _], module) and - String.downcase(List.last(module)) == task + task_match?(module, task) end) if module do @@ -35,6 +35,13 @@ defp mix_task(task, args) do end end + defp task_match?(module_path, task) do + module_path + |> Enum.join(".") + |> String.downcase() + |> String.ends_with?(String.downcase(task)) + end + def migrate(args) do Mix.Tasks.Pleroma.Ecto.Migrate.run(args) end