improvement: add ash.rollback mix task

chore: fix some naming/mix task steps
This commit is contained in:
Zach Daniel 2024-04-09 20:24:08 -04:00
parent 4f26773fe0
commit 46ed97dd10
6 changed files with 4 additions and 0 deletions

View file

@ -7,6 +7,7 @@ defmodule Mix.Tasks.Ash.Codegen do
@shortdoc "Runs all codegen tasks for any extension on any resource/domain in your application."
@doc @shortdoc
def run(argv) do
Mix.Task.run("compile")
{name, argv} =
case argv do
["-" <> _ | _] ->

View file

@ -7,6 +7,8 @@ defmodule Mix.Tasks.Ash.Rollback do
@shortdoc "Runs all rollback tasks for any extension on any resource/domain in your application."
@doc @shortdoc
def run(argv) do
Mix.Task.run("compile")
argv
|> Ash.Mix.Tasks.Helpers.extensions!()
|> Enum.map(fn extension ->

View file

@ -33,6 +33,7 @@ defmodule Ash.Mix.Tasks.Helpers do
end
end
@doc """
Get all domains for the current project and ensure they are compiled.
"""