tagit_command/lib.rs
1//! `clap` part of `tagit`.
2
3use clap::Subcommand;
4use tagit_sub_command::SubtreeCommand;
5
6/// Commands passed to `tagit` CLI.
7#[derive(Subcommand)]
8pub enum Command {
9 /// Automatically push tags for workspace packages
10 ///
11 /// For root package: X.Y.Z
12 ///
13 /// For subpackages: package/X.Y.Z
14 ///
15 /// Requires signing
16 Tag {
17 #[arg(long)]
18 dry_run: bool,
19 #[arg(long)]
20 no_retag: bool,
21 #[arg(long)]
22 total_order: bool,
23 },
24 /// Manage subtrees in the .tagit/sub/ directory
25 ///
26 /// Without a subcomand, equivalent to `tagit sub ls`
27 Sub {
28 #[command(subcommand)]
29 command: Option<SubtreeCommand>,
30 },
31 Changelog {
32 #[arg(long)]
33 dry_run: bool,
34 },
35 /// Bash completions
36 ///
37 /// tagit completions > /usr/share/bash-completion/completions/tagit
38 Completions,
39 /// Generate docs
40 ///
41 /// Writes manpages to ./target/man1
42 Doc,
43}