Skip to content

Commit

Permalink
Update releaser/src/package_manager/python/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
paulgb and coderabbitai[bot] authored Sep 23, 2024
1 parent 9998f5f commit 80ca67a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions releaser/src/package_manager/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,22 @@ impl PackageManager for PythonPackageManager {
.output()?;

// Upload the package
Command::new(python)
let upload_output = Command::new(python)
.arg("-m")
.arg("twine")
.arg("upload")
.arg("dist/*")
.current_dir(path)
.output()?;
.output()
.context("Failed to execute twine upload command")?;

if !upload_output.status.success() {
return Err(anyhow::anyhow!(
"Twine upload failed with status: {}.\nStderr: {}",
upload_output.status,
String::from_utf8_lossy(&upload_output.stderr)
));
}

Ok(())
}
Expand Down

0 comments on commit 80ca67a

Please sign in to comment.