|
|
|
@ -445,7 +445,7 @@ struct VersionMeta {
|
|
|
|
|
|
|
|
|
|
impl VersionMeta { |
|
|
|
|
pub fn source_dir(&self) -> PathBuf { |
|
|
|
|
self.tmp.path().join(&format!( |
|
|
|
|
self.tmp.path().join(format!( |
|
|
|
|
"{}-{}", |
|
|
|
|
self.index_meta.name, self.index_meta.vers |
|
|
|
|
)) |
|
|
|
@ -468,7 +468,7 @@ fn parse_one_manifest(
|
|
|
|
|
let dot_crate_path = config |
|
|
|
|
.src |
|
|
|
|
.crate_files_dir |
|
|
|
|
.join(&format!("{}/{}/download", crate_name, index_meta.vers)); |
|
|
|
|
.join(format!("{}/{}/download", crate_name, index_meta.vers)); |
|
|
|
|
verify_file_exists(&dot_crate_path)?; |
|
|
|
|
|
|
|
|
|
trace!(path = ?dot_crate_path, "reading .crate file"); |
|
|
|
@ -498,7 +498,7 @@ fn parse_one_manifest(
|
|
|
|
|
|
|
|
|
|
trace!(tmpdir = ?tmp.path(), "unpacked .crate archive to temp dir"); |
|
|
|
|
let target_dir = tmp.path().join("target"); |
|
|
|
|
std::fs::create_dir(&target_dir)?; |
|
|
|
|
std::fs::create_dir(target_dir)?; |
|
|
|
|
|
|
|
|
|
Ok(VersionMeta { |
|
|
|
|
index_meta, |
|
|
|
@ -643,7 +643,7 @@ fn prepare_source_dir_for_publish(config: &Config, meta: &mut VersionMeta) -> Re
|
|
|
|
|
.cargo_toml_orig |
|
|
|
|
.parse::<toml_edit::Document>()?; |
|
|
|
|
|
|
|
|
|
edit_deps(&mut modified_manifest, &config); |
|
|
|
|
edit_deps(&mut modified_manifest, config); |
|
|
|
|
edit_publish_registry( |
|
|
|
|
&mut modified_manifest, |
|
|
|
|
&config.src.registry_name, |
|
|
|
@ -694,7 +694,7 @@ fn prepare_source_dirs_for_publish(
|
|
|
|
|
manifests.par_iter_mut() |
|
|
|
|
.map(|(name, versions)| -> Result<(), Error> { |
|
|
|
|
for meta in versions.iter_mut() { |
|
|
|
|
prepare_source_dir_for_publish(&config, meta) |
|
|
|
|
prepare_source_dir_for_publish(config, meta) |
|
|
|
|
.map_err(|err| { |
|
|
|
|
error!(%name, vers = %meta.index_meta.vers, ?err, "prepare_source_dir_for_publish failed"); |
|
|
|
|
err |
|
|
|
|