fix cargo publish errors

This commit is contained in:
Zero 2023-04-17 18:29:08 -06:00
parent fcd8fe4bc5
commit bde74dbc8b
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B
2 changed files with 17 additions and 7 deletions

View file

@ -108,7 +108,10 @@ fn main() {
}
// clean the whisper build directory to prevent Cargo from complaining during crate publish
env::set_current_dir("..").expect("Unable to change directory to whisper.cpp");
_ = std::fs::remove_dir_all("build");
// for whatever reason this file is generated during build and triggers cargo complaining
_ = std::fs::remove_file("bindings/javascript/package.json");
}
// From https://github.com/alexcrichton/cc-rs/blob/fba7feded71ee4f63cfe885673ead6d7b4f2f454/src/lib.rs#L2462