mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Rebuild test-runtime if substrate binary is updated (#362)
* Re-run test-runtime build script if the substrate binary changes * cargo fmt * Can => Cannot
This commit is contained in:
@@ -113,6 +113,14 @@ async fn run() {
|
||||
fs::write(&runtime_path, runtime_api_contents)
|
||||
.expect("Couldn't write runtime rust output");
|
||||
|
||||
let substrate_path =
|
||||
which::which(substrate_bin).expect("Cannot resolve path to substrate binary");
|
||||
|
||||
// Re-build if the substrate binary we're pointed to changes (mtime):
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
substrate_path.to_string_lossy()
|
||||
);
|
||||
// Re-build if we point to a different substrate binary:
|
||||
println!("cargo:rerun-if-env-changed={}", SUBSTRATE_BIN_ENV_VAR);
|
||||
// Re-build if this file changes:
|
||||
|
||||
Reference in New Issue
Block a user