Skip to content

Commit

Permalink
chore: new xtask bump-check
Browse files Browse the repository at this point in the history
This is a rewrite of old `ci/validate-version-bump.sh` in Rust.
  • Loading branch information
weihanglo committed Aug 1, 2023
1 parent c91a693 commit 9cca572
Show file tree
Hide file tree
Showing 4 changed files with 457 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions crates/xtask-bump-check/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "xtask-bump-check"
version = "0.0.0"
edition.workspace = true
publish = false

[dependencies]
anyhow.workspace = true
cargo.workspace = true
cargo-util.workspace = true
clap.workspace = true
env_logger.workspace = true
git2.workspace = true
log.workspace = true
15 changes: 15 additions & 0 deletions crates/xtask-bump-check/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mod xtask;

fn main() {
env_logger::init_from_env("CARGO_LOG");
let cli = xtask::cli();
let matches = cli.get_matches();

let mut config = cargo::util::config::Config::default().unwrap_or_else(|e| {
let mut eval = cargo::core::shell::Shell::new();
cargo::exit_with_error(e.into(), &mut eval)
});
if let Err(e) = xtask::exec(&matches, &mut config) {
cargo::exit_with_error(e, &mut config.shell())
}
}
Loading

0 comments on commit 9cca572

Please sign in to comment.