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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! Arguments for `rk lines`.
use camino::Utf8PathBuf;
use clap::{Args, Subcommand};
/// Open, inventory, and retire the release lines.
#[derive(Debug, Args)]
pub struct LinesArgs {
/// What to do with the lines.
#[command(subcommand)]
pub action: LinesAction,
}
/// The line verbs. A line is `release/<major>.<minor>`: cut from an
/// explicit base, released by hand, and retired only behind its tags.
#[derive(Debug, Subcommand)]
pub enum LinesAction {
/// Report every release line — its tags, its tag coverage, and its
/// seat — offline.
List {
/// The repository to read; any of its worktrees names it.
#[arg(long, default_value = ".")]
target: Utf8PathBuf,
/// Emit one JSON object on stdout instead of the human report.
#[arg(long)]
json: bool,
},
/// Open `release/<line>` at an explicit base, seated per the recorded
/// workflow mode; preview by default.
Open {
/// The line's `<major>.<minor>`.
line: String,
/// The commit-ish the line is cut from — the tag it patches. A
/// line is a snapshot of a chosen commit, so there is no default.
#[arg(long)]
base: Option<String>,
/// The repository to act on; any of its worktrees names it.
#[arg(long, default_value = ".")]
target: Utf8PathBuf,
/// Create the line; without it the intent is reported and nothing
/// is touched.
#[arg(long)]
apply: bool,
/// Emit one JSON object on stdout instead of the human report.
#[arg(long)]
json: bool,
},
/// Report a line's newest candidate tag and the next number a finding
/// would mint; read-only, because a tag is never hand-authored.
Rc {
/// The line's `<major>.<minor>`.
line: String,
/// The repository to read; any of its worktrees names it.
#[arg(long, default_value = ".")]
target: Utf8PathBuf,
/// Emit one JSON object on stdout instead of the human report.
#[arg(long)]
json: bool,
},
/// Retire a line that left production: the seat before the branch,
/// only behind its tags, and only under --apply; the remote deletion
/// stays the operator's.
Retire {
/// The line's `<major>.<minor>`.
line: String,
/// The repository to act on; any of its worktrees names it.
#[arg(long, default_value = ".")]
target: Utf8PathBuf,
/// Remove the seat and delete the local branch; without it the
/// intent is reported and nothing is touched.
#[arg(long)]
apply: bool,
/// Emit one JSON object on stdout instead of the human report.
#[arg(long)]
json: bool,
},
}