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