Extract fly helpers for Mix tasks

This commit is contained in:
Claudio Ortolina
2024-12-01 12:27:07 +00:00
parent bdfae15f35
commit c4cafa0bf6
4 changed files with 17 additions and 3 deletions
@@ -0,0 +1,9 @@
defmodule Mix.Tasks.MusicLibrary.Prod.Helpers do
def fly_ssh(command) do
System.cmd("flyctl", ["ssh", "console", "--command", command], into: IO.stream())
end
def fly_sftp_get(remote_path, local_path) do
System.cmd("flyctl", ["ssh", "sftp", "get", remote_path, local_path], into: IO.stream())
end
end