Skip to content

Commit

Permalink
Add \--skip-existing\ to publish command
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Mar 4, 2024
1 parent 37f5ba9 commit 78796a8
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_

- Rye's `publish` command now offers `--force` (`-f`) to publish distribution files even if they are already found in the target repository.

- 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 78796a8

Please sign in to comment.