xtask/cmd/release/mod.rs
1use anyhow::Context;
2
3mod check;
4mod publish;
5mod update;
6mod utils;
7
8#[derive(Debug, Clone, clap::Subcommand)]
9pub enum Commands {
10 /// Update manifests & changelogs for packages that have been changed
11 Update(update::Update),
12 /// Find and report errors in packages
13 Check(check::Check),
14 /// Publish release
15 Publish(publish::Publish),
16}
17
18impl Commands {
19 pub fn run(self) -> anyhow::Result<()> {
20 match self {
21 Commands::Update(cmd) => cmd.run().context("update"),
22 Commands::Check(cmd) => cmd.run().context("check"),
23 Commands::Publish(cmd) => cmd.run().context("publish"),
24 }
25 }
26}