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    /// Write the upgrade; without it every file's action is listed and
23    /// nothing is touched.
24    #[arg(long)]
25    pub apply: bool,
26
27    /// Emit one JSON object on stdout instead of the human report.
28    #[arg(long)]
29    pub json: bool,
30}