--- a/librubyfmt/build.rs +++ b/librubyfmt/build.rs @@ -33,27 +33,9 @@ let path = env::current_dir()?; let ruby_checkout_path = path.join("ruby_checkout"); - let old_checkout_sha = if ruby_checkout_path.join(ripper).exists() { - Some(get_ruby_checkout_sha()) - } else { - None - }; - - let _ = Command::new("git") - .args(["submodule", "update", "--init"]) - .status(); - - let new_checkout_sha = get_ruby_checkout_sha(); - - // Only rerun this build if the ruby_checkout has changed - match old_checkout_sha { - Some(old_sha) if old_sha == new_checkout_sha => {} - _ => { - make_configure(&ruby_checkout_path)?; - run_configure(&ruby_checkout_path)?; - build_ruby(&ruby_checkout_path)?; - } - } + make_configure(&ruby_checkout_path)?; + run_configure(&ruby_checkout_path)?; + build_ruby(&ruby_checkout_path)?; let arch = extract_ruby_arch(&ruby_checkout_path); @@ -225,15 +207,3 @@ Err(format!("Command {} failed with: {}", command, code).into()) } } - -fn get_ruby_checkout_sha() -> String { - String::from_utf8( - Command::new("git") - .args(["rev-parse", "HEAD"]) - .current_dir("./ruby_checkout") - .output() - .expect("git rev-parse shouldn't fail") - .stdout, - ) - .expect("output should be valid utf8") -}