aboutsummaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorPhilipp Herzog2022-09-14 12:38:08 +0200
committerPhilipp Herzog2022-11-18 13:41:54 +0100
commitd0c86650424ae60209767a90d5c93012c95b0fec (patch)
tree105f43d6190a650b151be3826a101e289b730703 /src/cli.rs
parentbe40823735bbdc40c1f6b7725c8b74d5a85d8023 (diff)
Add option to build on the remote host
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cli.rs b/src/cli.rs
index a32f8c5..08633d8 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -56,6 +56,10 @@ pub struct Opts {
#[clap(short, long)]
skip_checks: bool,
+ /// Build on remote host
+ #[clap(long)]
+ remote_build: bool,
+
/// Override the SSH user with the given value
#[clap(long)]
ssh_user: Option<String>,
@@ -138,9 +142,7 @@ async fn check_deployment(
.arg(format!("let r = import {}/.; x = (if builtins.isFunction r then (r {{}}) else r); in if x ? checks then x.checks.${{builtins.currentSystem}} else {{}}", repo));
}
- for extra_arg in extra_build_args {
- check_command.arg(extra_arg);
- }
+ check_command.args(extra_build_args);
let check_status = check_command.status().await?;
@@ -239,9 +241,7 @@ async fn get_deployment_data(
.arg(format!("let r = import {}/.; in if builtins.isFunction r then (r {{}}).deploy else r.deploy", flake.repo))
};
- for extra_arg in extra_build_args {
- c.arg(extra_arg);
- }
+ c.args(extra_build_args);
let build_child = c
.stdout(Stdio::piped())
@@ -640,6 +640,7 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> {
temp_path: opts.temp_path,
confirm_timeout: opts.confirm_timeout,
dry_activate: opts.dry_activate,
+ remote_build: opts.remote_build,
sudo: opts.sudo,
};