mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Fixes bug in wasm-builder with cargo publish (#7299)
* Fixes bug in wasm-builder with cargo publish There was a bug in wasm-builder which resulted in generating a `Cargo.lock` in the project directory because of running `cargo metadata`. This resulted in commands like `cargo publish` to fail (if there was no `Cargo.lock` before building), because it checks that the project directory isn't modified. * Update utils/wasm-builder/src/wasm_project.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -181,16 +181,16 @@ pub fn build_project_with_default_rustflags(
|
||||
};
|
||||
|
||||
write_file_if_changed(
|
||||
file_name.into(),
|
||||
format!(
|
||||
r#"
|
||||
pub const WASM_BINARY: Option<&[u8]> = Some(include_bytes!("{wasm_binary}"));
|
||||
pub const WASM_BINARY_BLOATY: Option<&[u8]> = Some(include_bytes!("{wasm_binary_bloaty}"));
|
||||
"#,
|
||||
wasm_binary = wasm_binary,
|
||||
wasm_binary_bloaty = wasm_binary_bloaty,
|
||||
),
|
||||
);
|
||||
file_name.into(),
|
||||
format!(
|
||||
r#"
|
||||
pub const WASM_BINARY: Option<&[u8]> = Some(include_bytes!("{wasm_binary}"));
|
||||
pub const WASM_BINARY_BLOATY: Option<&[u8]> = Some(include_bytes!("{wasm_binary_bloaty}"));
|
||||
"#,
|
||||
wasm_binary = wasm_binary,
|
||||
wasm_binary_bloaty = wasm_binary_bloaty,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Checks if the build of the WASM binary should be skipped.
|
||||
|
||||
Reference in New Issue
Block a user