diff options
author | Philipp Herzog | 2022-11-18 19:46:37 +0100 |
---|---|---|
committer | GitHub | 2022-11-18 19:46:37 +0100 |
commit | 2a3c5f70eee04a465aa534d8bd4fcc9bb3c4a8ce (patch) | |
tree | 105f43d6190a650b151be3826a101e289b730703 /src/lib.rs | |
parent | be40823735bbdc40c1f6b7725c8b74d5a85d8023 (diff) | |
parent | d0c86650424ae60209767a90d5c93012c95b0fec (diff) |
Merge pull request #175 from serokell/philtaken/remote-building
Add option to build on the target host
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -163,6 +163,7 @@ pub struct CmdOverrides { pub confirm_timeout: Option<u16>, pub sudo: Option<String>, pub dry_activate: bool, + pub remote_build: bool, } #[derive(PartialEq, Debug)] @@ -395,10 +396,10 @@ impl<'a> DeployData<'a> { } fn get_sudo(&'a self) -> String { - return match self.merged_settings.sudo { - Some(ref x) => x.clone(), - None => "sudo -u".to_string() - }; + match self.merged_settings.sudo { + Some(ref x) => x.clone(), + None => "sudo -u".to_string(), + } } } @@ -416,6 +417,10 @@ pub fn make_deploy_data<'a, 's>( merged_settings.merge(node.generic_settings.clone()); merged_settings.merge(top_settings.clone()); + // build all machines remotely when the command line flag is set + if cmd_overrides.remote_build { + merged_settings.remote_build = Some(cmd_overrides.remote_build); + } if cmd_overrides.ssh_user.is_some() { merged_settings.ssh_user = cmd_overrides.ssh_user.clone(); } |