From 11af7416082138a6fa383d25c17ae94012795523 Mon Sep 17 00:00:00 2001 From: Chris Pryer <14341145+cnpryer@users.noreply.github.com> Date: Sun, 3 Mar 2024 19:23:51 -0500 Subject: [PATCH] Add --skip-existing to publish command (#831) --- CHANGELOG.md | 2 ++ rye/src/cli/publish.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 342624cbf1..fad49143dc 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());