From 3af3751d8e33d71b193b56da06173a3d5cf41da8 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Thu, 1 Sep 2022 18:42:37 -0600 Subject: [PATCH] apply: Default to the "boot" goal if --reboot is passed Fixes #113. --- manual/src/release-notes.md | 1 + src/command/apply.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/manual/src/release-notes.md b/manual/src/release-notes.md index 87844a3..f512d38 100644 --- a/manual/src/release-notes.md +++ b/manual/src/release-notes.md @@ -12,6 +12,7 @@ - The `--no-substitutes` option under the `apply` subcommand has been renamed to `--no-substitute` ([#59](https://github.com/zhaofengli/colmena/issues/59)). - The [`meta.nodeSpecialArgs`](./reference/meta.md#nodespecialargs) option has been added. It allows specifying node-specific `specialArgs` passed to NixOS modules ([#100](https://github.com/zhaofengli/colmena/pull/100)). - The [`repl`](./reference/cli.html#colmena-repl) subcommand has been added. It allows you to start an [interactive REPL](./features/eval.md#interactive-repl) with access to the complete node configurations. +- The default goal for `colmena apply` is now `boot` if `--reboot` is specified, and `switch` otherwise ([#113](https://github.com/zhaofengli/colmena/issues/113)). ## [Release 0.3.1](https://github.com/zhaofengli/colmena/releases/tag/v0.3.1) (2022/08/18) diff --git a/src/command/apply.rs b/src/command/apply.rs index f11dfb2..cf7b3a1 100644 --- a/src/command/apply.rs +++ b/src/command/apply.rs @@ -127,7 +127,18 @@ pub fn subcommand() -> ClapCommand<'static> { .about("Apply configurations on remote machines") .arg(Arg::new("goal") .help("Deployment goal") - .long_help("Same as the targets for switch-to-configuration.\n\"push\" means only copying the closures to remote nodes.") + .long_help(r#"The goal of the deployment. + +Same as the targets for switch-to-configuration, with the following extra pseudo-goals: + +- build: Only build the system profiles +- push: Only copy the closures to remote nodes +- keys: Only upload the keys to the remote nodes + +`switch` is the default goal unless `--reboot` is passed, in which case `boot` is the default. +"#) + .default_value("switch") + .default_value_if("reboot", None, Some("boot")) .default_value("switch") .index(1) .possible_values(&["build", "push", "switch", "boot", "test", "dry-activate", "keys"]))