release_kit/cli/upgrade.rs
1//! Arguments for `rk upgrade`.
2
3use camino::Utf8PathBuf;
4use clap::Args;
5
6/// Take a landed target to this binary's payload. The technology, the
7/// forge, and the landing parameters all come from the record, so an
8/// upgrade cannot silently switch either.
9#[derive(Debug, Args)]
10pub struct UpgradeArgs {
11 /// The landed repository to upgrade.
12 #[arg(long, default_value = ".")]
13 pub target: Utf8PathBuf,
14
15 /// Change the recorded working-copy mode: worktree or branches. The
16 /// one overridden parameter — everything else comes from the record —
17 /// and the apply's diff is the visible mode change. Omitted, the
18 /// recorded mode is kept.
19 #[arg(long)]
20 pub workflow: Option<String>,
21
22 /// Change the recorded release style: trunk or lines. A record that
23 /// already carries one needs no flag; a record from before the
24 /// parameter existed refuses until one names it, and the answer is
25 /// recorded.
26 #[arg(long)]
27 pub style: Option<String>,
28
29 /// Change the recorded Nix opt-in: `on` adds the capability's files
30 /// and records it; `off` drops them from the record while the files
31 /// stay on disk as the target's own, like any file this payload stops
32 /// shipping. Omitted, the recorded choice is kept.
33 #[arg(long)]
34 pub nix: Option<String>,
35
36 /// Write the upgrade; without it every file's action is listed and
37 /// nothing is touched.
38 #[arg(long)]
39 pub apply: bool,
40
41 /// Emit one JSON object on stdout instead of the human report.
42 #[arg(long)]
43 pub json: bool,
44}