Skip to content

Commit

Permalink
feat(publish): add instructions to publish the crate, allow to skip f…
Browse files Browse the repository at this point in the history
…ile generation in build script
  • Loading branch information
joelwurtz committed Aug 3, 2022
1 parent aa78e36 commit 6516d83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/build.rs
Expand Up @@ -253,6 +253,10 @@ fn main() {
let build_dir = Path::new(crate_dir.as_str());
let output_file = build_dir.join(format!("{}.h", package_name));

if env::var("PUBLISH_SKIP_BUILD").is_ok() {
return;
}

cbindgen::generate(crate_dir)
.expect("Unable to generate bindings")
.write_to_file(&output_file);
Expand Down

0 comments on commit 6516d83

Please sign in to comment.