Add a key for running remote topgrades

This commit is contained in:
Roey Darwish Dror
2019-06-05 14:15:45 +03:00
parent 232c886be6
commit 4a7218293b
5 changed files with 37 additions and 3 deletions

View File

@@ -136,3 +136,18 @@ pub fn run_composer_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()
Ok(())
}
pub fn run_remote_topgrade(run_type: RunType, hostname: &str) -> Result<(), Error> {
let ssh = utils::require("ssh")?;
run_type
.execute(&ssh)
.args(&[
"-t",
hostname,
"env",
&format!("TOPGRADE_PREFIX={}", hostname),
"topgrade",
])
.check_run()
}