mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
ci: add quick-check with rustfmt (#615)
* ci: add quick-check with clippy and rustfmt * chore: rustfmt round * chore: set the same rustfmt config than substrate * chore: fix formatting * cI: remove clippy * ci: switch to nightly for the checks * ci: fix toolchains and naming * ci: Limit the check to formatting * chore: fix formatting * Update .rustfmt.toml * Update .rustfmt.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ const SKIP_ENV: &str = "SKIP_BUILD";
|
||||
|
||||
fn main() {
|
||||
if env::var(SKIP_ENV).is_ok() {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").expect("`OUT_DIR` is set by cargo"));
|
||||
@@ -35,11 +35,8 @@ fn main() {
|
||||
let project = create_project(&out_dir);
|
||||
build_project(&project.join("Cargo.toml"));
|
||||
|
||||
fs::copy(
|
||||
project.join("target/release").join(PROJECT_NAME),
|
||||
out_dir.join(PROJECT_NAME),
|
||||
)
|
||||
.expect("Copies validation worker");
|
||||
fs::copy(project.join("target/release").join(PROJECT_NAME), out_dir.join(PROJECT_NAME))
|
||||
.expect("Copies validation worker");
|
||||
}
|
||||
|
||||
fn find_cargo_lock() -> PathBuf {
|
||||
@@ -49,7 +46,7 @@ fn find_cargo_lock() -> PathBuf {
|
||||
|
||||
loop {
|
||||
if path.join("Cargo.lock").exists() {
|
||||
return path.join("Cargo.lock");
|
||||
return path.join("Cargo.lock")
|
||||
}
|
||||
|
||||
if !path.pop() {
|
||||
@@ -109,7 +106,7 @@ fn build_project(cargo_toml: &Path) {
|
||||
.status();
|
||||
|
||||
match status.map(|s| s.success()) {
|
||||
Ok(true) => {}
|
||||
Ok(true) => {},
|
||||
// Use `process.exit(1)` to have a clean error output.
|
||||
_ => process::exit(1),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user