Skip to main content

release_kit/cli/
release.rs

1//! Arguments for `rk release`.
2
3use camino::Utf8PathBuf;
4use clap::{Args, Subcommand};
5
6/// Report where the target's release stands.
7#[derive(Debug, Args)]
8pub struct ReleaseArgs {
9    /// What to report.
10    #[command(subcommand)]
11    pub action: ReleaseAction,
12}
13
14/// The release verbs.
15#[derive(Debug, Subcommand)]
16pub enum ReleaseAction {
17    /// Report the release style, the release request, the last release,
18    /// each release line, and every symptom a stuck release shows. The
19    /// record fields read offline; a forge field reads unknown where this
20    /// runtime cannot read the forge.
21    Status {
22        /// The repository to report on.
23        #[arg(long, default_value = ".")]
24        target: Utf8PathBuf,
25
26        /// Wait until the publish run and the artifact run on this commit
27        /// conclude, selected by the commit and never by recency, then
28        /// report the release they made.
29        #[arg(long, value_name = "SHA")]
30        wait: Option<String>,
31
32        /// How long `--wait` waits before it gives up, in seconds.
33        #[arg(long, default_value_t = 3600, requires = "wait")]
34        timeout: u64,
35
36        /// Emit one JSON object on stdout instead of the human report.
37        #[arg(long)]
38        json: bool,
39    },
40}