|
3 | 3 | #![warn(rust_2018_idioms, unused_lifetimes)] |
4 | 4 |
|
5 | 5 | use clap::{Args, Parser, Subcommand}; |
6 | | -use clippy_dev::{dogfood, fmt, lint, new_lint, serve, setup, sync, update_lints, utils}; |
| 6 | +use clippy_dev::{dogfood, fmt, lint, new_lint, release, serve, setup, sync, update_lints, utils}; |
7 | 7 | use std::convert::Infallible; |
8 | 8 |
|
9 | 9 | fn main() { |
@@ -78,6 +78,9 @@ fn main() { |
78 | 78 | DevCommand::Sync(SyncCommand { subcommand }) => match subcommand { |
79 | 79 | SyncSubcommand::UpdateNightly => sync::update_nightly(), |
80 | 80 | }, |
| 81 | + DevCommand::Release(ReleaseCommand { subcommand }) => match subcommand { |
| 82 | + ReleaseSubcommand::BumpVersion => release::bump_version(), |
| 83 | + }, |
81 | 84 | } |
82 | 85 | } |
83 | 86 |
|
@@ -230,6 +233,8 @@ enum DevCommand { |
230 | 233 | }, |
231 | 234 | /// Sync between the rust repo and the Clippy repo |
232 | 235 | Sync(SyncCommand), |
| 236 | + /// Manage Clippy releases |
| 237 | + Release(ReleaseCommand), |
233 | 238 | } |
234 | 239 |
|
235 | 240 | #[derive(Args)] |
@@ -309,3 +314,16 @@ enum SyncSubcommand { |
309 | 314 | /// Update nightly version in rust-toolchain and clippy_utils |
310 | 315 | UpdateNightly, |
311 | 316 | } |
| 317 | + |
| 318 | +#[derive(Args)] |
| 319 | +struct ReleaseCommand { |
| 320 | + #[command(subcommand)] |
| 321 | + subcommand: ReleaseSubcommand, |
| 322 | +} |
| 323 | + |
| 324 | +#[derive(Subcommand)] |
| 325 | +enum ReleaseSubcommand { |
| 326 | + #[command(name = "bump_version")] |
| 327 | + /// Bump the version in the Cargo.toml files |
| 328 | + BumpVersion, |
| 329 | +} |
0 commit comments