[英]Write a Mix task that runs after deps.get
Is there a way to hook into Elixir's Mix built in tasks to execute a task after another one has completed? 有没有办法挂钩到Elixir的内置任务中,以便在另一个任务完成后执行任务?
I know you can do something similar to this. 我知道您可以做类似的事情。
defmodule Mix.Tasks.Other.Get
use Mix.Task
@shortdoc "Other dependencies?"
def run(_) do
Mix.Task.run("deps.get")
end
end
But I kindof want a task to run right after mix deps.get
considering using make
to wrap the commands that make the most sense. 但是我有点想让任务在mix deps.get
之后立即运行,考虑使用make
来包装最有意义的命令。 (ie make deps
which would run both mix deps.get
then mix other.get
) (即make deps
将同时运行两个mix deps.get
然后mix other.get
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.