-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix build dependency isuse * cargo fmt * fix lint failure in CI * update toolchain
- Loading branch information
Showing
9 changed files
with
37 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
use std::process::Command; | ||
// use std::process::Command; | ||
|
||
const INSTALL_ERROR_MESSAGE: &str = | ||
"Install dependencies for contract fail, try to run `yarn` in folder 'zerog-storage-contracts'"; | ||
const COMPILE_ERROR_MESSAGE: &str = | ||
"Compile solidity contracts fail, try to run `yarn compile` in folder 'zerog-storage-contracts'"; | ||
// const INSTALL_ERROR_MESSAGE: &str = | ||
// "Install dependencies for contract fail, try to run `yarn` in folder 'zerog-storage-contracts'"; | ||
// const COMPILE_ERROR_MESSAGE: &str = | ||
// "Compile solidity contracts fail, try to run `yarn compile` in folder 'zerog-storage-contracts'"; | ||
|
||
fn main() { | ||
if cfg!(feature = "compile-contracts") { | ||
println!("cargo:rerun-if-changed=../../zerog-storage-contracts/contracts/"); | ||
println!("cargo:rerun-if-changed=../../zerog-storage-contracts/hardhat.config.ts"); | ||
// if cfg!(feature = "compile-contracts") { | ||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/contracts/"); | ||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/hardhat.config.ts"); | ||
|
||
let output = Command::new("yarn") | ||
.arg("--cwd") | ||
.arg("../../zerog-storage-contracts") | ||
.status() | ||
.expect(INSTALL_ERROR_MESSAGE); | ||
assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE); | ||
// let output = Command::new("yarn") | ||
// .arg("--cwd") | ||
// .arg("../../zerog-storage-contracts") | ||
// .status() | ||
// .expect(INSTALL_ERROR_MESSAGE); | ||
// assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE); | ||
|
||
let output = Command::new("yarn") | ||
.arg("--cwd") | ||
.arg("../../zerog-storage-contracts") | ||
.arg("compile") | ||
.status() | ||
.expect(COMPILE_ERROR_MESSAGE); | ||
assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE); | ||
} else { | ||
println!("cargo:rerun-if-changed=../../zerog-storage-contracts/artifacts/"); | ||
} | ||
// let output = Command::new("yarn") | ||
// .arg("--cwd") | ||
// .arg("../../zerog-storage-contracts") | ||
// .arg("compile") | ||
// .status() | ||
// .expect(COMPILE_ERROR_MESSAGE); | ||
// assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE); | ||
// } else { | ||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/artifacts/"); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.73.0 | ||
1.75.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
# keep consistent with CI-lint in rust.yml | ||
cargo fmt --all | ||
cargo clippy -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters