diff options
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -86,6 +86,9 @@ pub struct Opts { /// Show what will be activated on the machines #[clap(long)] dry_activate: bool, + /// Don't activate, but update the boot loader to boot into the new profile + #[clap(long)] + boot: bool, /// Revoke all previously succeeded deploys when deploying multiple profiles #[clap(long)] rollback_succeeded: Option<bool>, @@ -409,6 +412,7 @@ async fn run_deploy( extra_build_args: &[String], debug_logs: bool, dry_activate: bool, + boot: bool, log_dir: &Option<String>, rollback_succeeded: bool, ) -> Result<(), RunDeployError> { @@ -560,7 +564,7 @@ async fn run_deploy( // Rollbacks adhere to the global seeting to auto_rollback and secondary // the profile's configuration for (_, deploy_data, deploy_defs) in &parts { - if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate).await + if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate, boot).await { error!("{}", e); if dry_activate { @@ -617,6 +621,10 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> { &deploy::LoggerType::Deploy, )?; + if opts.dry_activate && opts.boot { + error!("Cannot use both --dry-activate & --boot!"); + } + let deploys = opts .clone() .targets @@ -666,6 +674,7 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> { &opts.extra_build_args, opts.debug_logs, opts.dry_activate, + opts.boot, &opts.log_dir, opts.rollback_succeeded.unwrap_or(true), ) |