From f55afcfa39aab8e844e77901f2d065506084367f Mon Sep 17 00:00:00 2001 From: Chris Pryer Date: Sun, 3 Mar 2024 16:44:46 -0500 Subject: [PATCH] Add --skip-existing to publish command --- CHANGELOG.md | 2 ++ rye/src/cli/publish.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6c94944d1..90e385bb4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ that were not yet released. _Unreleased_ +- `--skip-existing` is now available with Rye's `publish` command. #831 + - Bumped `uv` to 0.1.13. #760, #820 - Bumped `ruff` to 0.3.0. #821 diff --git a/rye/src/cli/publish.rs b/rye/src/cli/publish.rs index 45bc4756e2..b243cbb034 100644 --- a/rye/src/cli/publish.rs +++ b/rye/src/cli/publish.rs @@ -42,6 +42,9 @@ pub struct Args { /// Path to alternate CA bundle. #[arg(long)] cert: Option, + /// Continue uploading files if one already exists (only applies to repositories supporting this feature) + #[arg(long)] + skip_existing: bool, /// Skip prompts. #[arg(short, long)] yes: bool, @@ -167,6 +170,9 @@ pub fn execute(cmd: Args) -> Result<(), Error> { if let Some(cert) = cmd.cert { publish_cmd.arg("--cert").arg(cert); } + if cmd.skip_existing { + publish_cmd.arg("--skip-existing"); + } if output == CommandOutput::Quiet { publish_cmd.stdout(Stdio::null());