Skip to main content

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    /// The Conventional Commit scopes this project accepts,
16    /// comma-separated. A record that already carries them needs no flag;
17    /// a record from before the parameter existed refuses until one names
18    /// them, and the answer is recorded.
19    #[arg(long)]
20    pub scopes: Option<String>,
21
22    /// Change the recorded working-copy mode: worktree or branches. The
23    /// one overridden parameter — everything else comes from the record —
24    /// and the apply's diff is the visible mode change. Omitted, the
25    /// recorded mode is kept.
26    #[arg(long)]
27    pub workflow: Option<String>,
28
29    /// Write the upgrade; without it every file's action is listed and
30    /// nothing is touched.
31    #[arg(long)]
32    pub apply: bool,
33
34    /// Emit one JSON object on stdout instead of the human report.
35    #[arg(long)]
36    pub json: bool,
37}