Skip to content

Commit

Permalink
fix: lib_name should replace hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
flisky committed Nov 23, 2023
1 parent b8c0575 commit 0420c36
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/commands/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,16 @@ fn run_for_crate(
}
}

let crate_name = lib.name.replace("-", "_");
for target in &targets {
build_with_output(target, &lib.name, mode, lib_type, config)?;
build_with_output(target, &crate_name, mode, lib_type, config)?;
}

generate_bindings_with_output(&targets, &lib.name, mode, lib_type, config)?;
generate_bindings_with_output(&targets, &crate_name, mode, lib_type, config)?;

recreate_output_dir(&package_name).expect("Could not create package output directory!");
create_xcframework_with_output(&targets, &lib.name, &package_name, mode, lib_type, config)?;
create_package_with_output(&package_name, &lib.name, config)?;
create_xcframework_with_output(&targets, &crate_name, &package_name, mode, lib_type, config)?;
create_package_with_output(&package_name, &crate_name, config)?;

Ok(())
}
Expand Down

0 comments on commit 0420c36

Please sign in to comment.