Skip to content

Commit 9cca572

Browse files
committed
chore: new xtask bump-check
This is a rewrite of old `ci/validate-version-bump.sh` in Rust.
1 parent c91a693 commit 9cca572

File tree

4 files changed

+457
-0
lines changed

4 files changed

+457
-0
lines changed

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/xtask-bump-check/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "xtask-bump-check"
3+
version = "0.0.0"
4+
edition.workspace = true
5+
publish = false
6+
7+
[dependencies]
8+
anyhow.workspace = true
9+
cargo.workspace = true
10+
cargo-util.workspace = true
11+
clap.workspace = true
12+
env_logger.workspace = true
13+
git2.workspace = true
14+
log.workspace = true

crates/xtask-bump-check/src/main.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
mod xtask;
2+
3+
fn main() {
4+
env_logger::init_from_env("CARGO_LOG");
5+
let cli = xtask::cli();
6+
let matches = cli.get_matches();
7+
8+
let mut config = cargo::util::config::Config::default().unwrap_or_else(|e| {
9+
let mut eval = cargo::core::shell::Shell::new();
10+
cargo::exit_with_error(e.into(), &mut eval)
11+
});
12+
if let Err(e) = xtask::exec(&matches, &mut config) {
13+
cargo::exit_with_error(e, &mut config.shell())
14+
}
15+
}

0 commit comments

Comments
 (0)