Browse Source

fix it so when you run in --dry-mode, it doesn't start publishing crates (!)

feat/mass-publish-tool
Jonathan Strong 1 year ago
parent
commit
25ade0806b
  1. 10
      src/publish.rs

10
src/publish.rs

@ -728,6 +728,16 @@ fn cargo_publish_modified_source_dir(config: &Config, meta: &VersionMeta) -> Res
args.extend_from_slice(&["--manifest-path", manifest_path_str.as_str()][..]); args.extend_from_slice(&["--manifest-path", manifest_path_str.as_str()][..]);
args.extend_from_slice(&["--no-verify", "--allow-dirty", "-vv"][..]); args.extend_from_slice(&["--no-verify", "--allow-dirty", "-vv"][..]);
if config.dry_run {
warn!(
name = %meta.index_meta.name,
vers = %meta.index_meta.vers,
cmd = format!("cargo {}", args.join(" ")),
"skipping actual publish cmd: --dry-run mode",
);
return Ok(())
}
debug!(name = %meta.index_meta.name, vers = %meta.index_meta.vers, "executing `cargo {}`", args.join(" ")); debug!(name = %meta.index_meta.name, vers = %meta.index_meta.vers, "executing `cargo {}`", args.join(" "));
let output = std::process::Command::new("cargo") let output = std::process::Command::new("cargo")
.env(&index_env_key, &config.dst.index_url) .env(&index_env_key, &config.dst.index_url)

Loading…
Cancel
Save