Add a key for running remote topgrades
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -89,8 +89,6 @@ pub fn run_wsl_topgrade(run_type: RunType) -> Result<(), Error> {
|
||||
.check_output()
|
||||
.map_err(|_| ErrorKind::SkipStep)?;
|
||||
|
||||
print_separator("WSL");
|
||||
|
||||
run_type
|
||||
.execute(&wsl)
|
||||
.args(&["bash", "-c"])
|
||||
|
||||
Reference in New Issue
Block a user