Resolves a recipe and applies it to the current app as one diff, then records the run as one git commit.
mix composer.recipe.run app/default
mix composer.recipe.run local:phx/app --gigalixir --oban-pro
mix composer.recipe.run app/default --dry-run
mix composer.recipe.run app/default --no-commitThe recipe reference is "cookbook:group/name" or an unqualified
"group/name", which is looked up in the current project's cookbook
first, then in every cookbook including local.
mix composer.recipe.list lists them.
Every flag declared in the flags: of the recipe, or of a recipe it
:uses, becomes a --flag option; mix composer.recipe.show RECIPE
shows them. Any other --flag is rejected.
Before anything runs, every reference is resolved and the steps'
requires are checked; a missing executable or an incompatible package
version stops the run.
Git commit
Unless --no-commit is given, the run:
- refuses to start if the app is not inside a git work tree, or if the tree has uncommitted, unstaged or untracked changes. This is checked before anything is written, including the dependency fetch;
- applies the steps as one diff, without asking (see below);
- commits everything with
git add -Aand a message listing the config directory, the flags, and every step with the recipe it came from.
The commit is a queued task, so it runs last, after any {:queue, ...}
steps, and only if the diff is applied. --dry-run commits nothing.
Unattended runs
The run always acts as if --yes were given: it applies the diff and
fetches dependencies without asking, so it goes through unattended. The
diff isn't shown; use --dry-run to preview it first (a dry run doesn't
add --yes, since Igniter hides the diff under it).
Options
-c,--config- the local config directory (seeComposer.Local)--no-commit- skip the git checks and the commit--dry-run- as for any Igniter task--yes- implied unless--dry-runis given