From 03b4501b26ae93d96d65fb04345ce191850c920f Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Thu, 2 May 2024 22:01:06 +0200 Subject: [PATCH] fixup! Josh preparations --- clippy_dev/src/sync.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clippy_dev/src/sync.rs b/clippy_dev/src/sync.rs index a8cc50dd3977..2a55e385c483 100644 --- a/clippy_dev/src/sync.rs +++ b/clippy_dev/src/sync.rs @@ -122,12 +122,12 @@ pub fn rustc_pull() { assert_clean_repo(&sh); - if !cmd!(sh, "git log --oneline -1") - .read() - .expect("failed to run git log") - .contains("Bump nightly version ->") + let date = Utc::now().format("%Y-%m-%d").to_string(); + if !std::fs::read_to_string("rust-toolchain") + .expect("failed to read rust-toolchain file") + .contains(&date) { - eprintln!("last commit must be a nightly bump commit. Run `cargo dev sync update_toolchain` first."); + eprintln!("Toolchain must be up to date before running `cargo dev sync pull`"); exit(1); }