diff options
author | notgne2 | 2021-05-10 21:40:30 -0700 |
---|---|---|
committer | GitHub | 2021-05-10 21:40:30 -0700 |
commit | f0456d67149edbf27a6cb0a4963386bc2e678267 (patch) | |
tree | 993a8d8aa793a0065c64c7326ed1ff15a5d00097 /src/bin/deploy.rs | |
parent | 9e405fbc5ab5bacbd271fd78c6b6b6877c4d9f8d (diff) | |
parent | 5d5da4898d41cefd1f79c4cf6dd451405ffb8996 (diff) |
Merge pull request #81 from kitnil/dry-activate
Add dry-activate
Diffstat (limited to '')
-rw-r--r-- | src/bin/deploy.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/deploy.rs b/src/bin/deploy.rs index 9c41d25..10e0552 100644 --- a/src/bin/deploy.rs +++ b/src/bin/deploy.rs @@ -74,6 +74,9 @@ struct Opts { /// Where to store temporary files (only used by magic-rollback) #[clap(long)] temp_path: Option<String>, + /// Show what will be activated on the machines + #[clap(long)] + dry_activate: bool, } /// Returns if the available Nix installation supports flakes @@ -379,6 +382,7 @@ async fn run_deploy( extra_build_args: &[String], debug_logs: bool, log_dir: Option<String>, + dry_activate: bool, ) -> Result<(), RunDeployError> { let to_deploy: ToDeploy = match (&deploy_flake.node, &deploy_flake.profile) { (Some(node_name), Some(profile_name)) => { @@ -499,7 +503,7 @@ async fn run_deploy( } for (deploy_data, deploy_defs) in &parts { - deploy::deploy::deploy_profile(&deploy_data, &deploy_defs).await?; + deploy::deploy::deploy_profile(&deploy_data, &deploy_defs, dry_activate).await?; } Ok(()) @@ -546,6 +550,7 @@ async fn run() -> Result<(), RunError> { magic_rollback: opts.magic_rollback, temp_path: opts.temp_path, confirm_timeout: opts.confirm_timeout, + dry_activate: opts.dry_activate, }; let supports_flakes = test_flake_support().await.map_err(RunError::FlakeTest)?; @@ -574,6 +579,7 @@ async fn run() -> Result<(), RunError> { &opts.extra_build_args, opts.debug_logs, opts.log_dir, + opts.dry_activate, ) .await?; |