projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OTP release install guide sceleton
[akkoma]
/
lib
/
pleroma
/
release_tasks.ex
diff --git
a/lib/pleroma/release_tasks.ex
b/lib/pleroma/release_tasks.ex
index 7726bc635836c2d4859c492efc73b26cc767f282..eb6eff61c2e3d1bce090b505d33c6ab0d6651e61 100644
(file)
--- a/
lib/pleroma/release_tasks.ex
+++ b/
lib/pleroma/release_tasks.ex
@@
-6,13
+6,12
@@
defmodule Pleroma.ReleaseTasks do
@repo Pleroma.Repo
def run(args) do
@repo Pleroma.Repo
def run(args) do
- Mix.Tasks.Pleroma.Common.start_pleroma()
[task | args] = String.split(args)
case task do
[task | args] = String.split(args)
case task do
- "migrate" -> migrate()
+ "migrate" -> migrate(
args
)
"create" -> create()
"create" -> create()
- "rollback" -> rollback(
String.to_integer(Enum.at(args, 0))
)
+ "rollback" -> rollback(
args
)
task -> mix_task(task, args)
end
end
task -> mix_task(task, args)
end
end
@@
-35,12
+34,12
@@
defmodule Pleroma.ReleaseTasks do
end
end
end
end
- def migrate do
-
{:ok, _, _} = Ecto.Migrator.with_repo(@repo, &Ecto.Migrator.run(&1, :up, all: true)
)
+ def migrate
(args)
do
+
Mix.Tasks.Pleroma.Ecto.Migrate.run(args
)
end
end
- def rollback(
version
) do
-
{:ok, _, _} = Ecto.Migrator.with_repo(@repo, &Ecto.Migrator.run(&1, :down, to: version)
)
+ def rollback(
args
) do
+
Mix.Tasks.Pleroma.Ecto.Rollback.run(args
)
end
def create do
end
def create do