2024-01-26 11:48:40 +00:00
|
|
|
// use std::process::Command;
|
2024-01-03 10:24:52 +00:00
|
|
|
|
2024-01-26 11:48:40 +00:00
|
|
|
// const INSTALL_ERROR_MESSAGE: &str =
|
2024-03-12 10:49:51 +00:00
|
|
|
// "Install dependencies for contract fail, try to run `yarn` in folder '0g-storage-contracts'";
|
2024-01-26 11:48:40 +00:00
|
|
|
// const COMPILE_ERROR_MESSAGE: &str =
|
2024-03-12 10:49:51 +00:00
|
|
|
// "Compile solidity contracts fail, try to run `yarn compile` in folder '0g-storage-contracts'";
|
2024-01-03 10:24:52 +00:00
|
|
|
|
|
|
|
fn main() {
|
2024-01-26 11:48:40 +00:00
|
|
|
// if cfg!(feature = "compile-contracts") {
|
2024-03-12 10:49:51 +00:00
|
|
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/contracts/");
|
|
|
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/hardhat.config.ts");
|
2024-01-03 10:24:52 +00:00
|
|
|
|
2024-01-26 11:48:40 +00:00
|
|
|
// let output = Command::new("yarn")
|
|
|
|
// .arg("--cwd")
|
2024-03-12 10:49:51 +00:00
|
|
|
// .arg("../../0g-storage-contracts")
|
2024-01-26 11:48:40 +00:00
|
|
|
// .status()
|
|
|
|
// .expect(INSTALL_ERROR_MESSAGE);
|
|
|
|
// assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE);
|
2024-01-03 10:24:52 +00:00
|
|
|
|
2024-01-26 11:48:40 +00:00
|
|
|
// let output = Command::new("yarn")
|
|
|
|
// .arg("--cwd")
|
2024-03-12 10:49:51 +00:00
|
|
|
// .arg("../../0g-storage-contracts")
|
2024-01-26 11:48:40 +00:00
|
|
|
// .arg("compile")
|
|
|
|
// .status()
|
|
|
|
// .expect(COMPILE_ERROR_MESSAGE);
|
|
|
|
// assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE);
|
|
|
|
// } else {
|
2024-03-12 10:49:51 +00:00
|
|
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/artifacts/");
|
2024-01-26 11:48:40 +00:00
|
|
|
// }
|
2024-01-03 10:24:52 +00:00
|
|
|
}
|