projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra diagnostic tasks in
[akkoma]
/
lib
/
pleroma
/
release_tasks.ex
diff --git
a/lib/pleroma/release_tasks.ex
b/lib/pleroma/release_tasks.ex
index 1e06aafe44dfa94730f0723798ab4142c5352fc7..75c0271377a0629f06f1e64d41acf676ffa64c77 100644
(file)
--- a/
lib/pleroma/release_tasks.ex
+++ b/
lib/pleroma/release_tasks.ex
@@
-25,7
+25,7
@@
defmodule Pleroma.ReleaseTasks do
module = Module.split(module)
match?(["Mix", "Tasks", "Pleroma" | _], module) and
module = Module.split(module)
match?(["Mix", "Tasks", "Pleroma" | _], module) and
- String.downcase(List.last(module)) == task
+ task_match?(module, task)
end)
if module do
end)
if module do
@@
-35,6
+35,13
@@
defmodule Pleroma.ReleaseTasks do
end
end
end
end
+ defp task_match?(["Mix", "Tasks", "Pleroma" | module_path], task) do
+ module_path
+ |> Enum.join(".")
+ |> String.downcase()
+ |> String.equivalent?(String.downcase(task))
+ end
+
def migrate(args) do
Mix.Tasks.Pleroma.Ecto.Migrate.run(args)
end
def migrate(args) do
Mix.Tasks.Pleroma.Ecto.Migrate.run(args)
end
@@
-54,9
+61,6
@@
defmodule Pleroma.ReleaseTasks do
IO.puts("The database for #{inspect(@repo)} has already been created")
{:error, term} when is_binary(term) ->
IO.puts("The database for #{inspect(@repo)} has already been created")
{:error, term} when is_binary(term) ->
- IO.puts(:stderr, "The database for #{inspect(@repo)} couldn't be created: #{term}")
-
- {:error, term} ->
IO.puts(
:stderr,
"The database for #{inspect(@repo)} couldn't be created: #{inspect(term)}"
IO.puts(
:stderr,
"The database for #{inspect(@repo)} couldn't be created: #{inspect(term)}"