1mod pubsub;
2
3pub use pubsub::PubSub;
4
5pub fn elixir(args: &[&str]) -> std::process::Command {
7 let mut cmd = std::process::Command::new(if cfg!(target_os = "windows") { "elixir.bat" } else { "elixir" });
8 cmd.args(args);
9 cmd
10}
11
12pub fn mix(task: &str, args: &[&str]) -> std::process::Command {
14 let mut cmd = std::process::Command::new(if cfg!(target_os = "windows") { "mix.bat" } else { "mix" });
15 cmd.arg(task);
16 cmd.args(args);
17 cmd
18}
19
20pub fn release(dir: impl AsRef<std::path::Path>, name: &str) -> std::process::Command {
22 let dir = dir.as_ref();
23 let mut script = dir.join("bin").join(name);
24 if cfg!(target_os = "windows") {
25 script.set_extension("bat");
26 }
27 let mut cmd = std::process::Command::new(script.to_str().unwrap());
28 cmd.args(["start"]);
29 cmd
30}