[英]Running a shell script as a mix alias
如何将Shell脚本作为混合别名运行?
我已经尝试了以下方法,但是没有运气:
defp aliases() do
[
"test": [ "./scripts/test.sh" ]
]
end
defp aliases() do
[
"test": [ "scripts/test.sh" ]
]
end
每个返回的变化:
** (Mix) The task "./scripts/test" could not be found
您可以Mix.Tasks.Cmd
使用调用Mix.Tasks.Cmd
任务:
"test": ["cmd ./scripts/test.sh"]
$ cat a.sh
#!/bin/bash
echo foo
$ cat mix.exs | grep test
"test": ["cmd ./a.sh", "cmd echo bar"]
$ mix test
foo
bar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.