Skip to content

Commit

Permalink
Add --skip-existing to publish command (astral-sh#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer authored Mar 4, 2024
1 parent 91b1f3d commit 11af741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions rye/src/cli/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ pub struct Args {
/// Path to alternate CA bundle.
#[arg(long)]
cert: Option<PathBuf>,
/// 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,
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 11af741

Please sign in to comment.