mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-02 04:48:18 +00:00
Add uv publish --dry-run (#15638)
## Summary `uv publish --dry-run` will perform the `--check-url` validation, and hit the `/validate` endpoint if the registry is known to support fast-path validation (like pyx). The `/validate` endpoint lets us validate an upload without uploading the file _contents_, which lets you skip the expensive step for common mistakes. In the future, my hope is that the `/validate` step will deprecated in favor of Upload API 2.0.
This commit is contained in:
parent
b57ad179b6
commit
7606f1ad3c
6 changed files with 187 additions and 25 deletions
|
|
@ -6572,6 +6572,13 @@ pub struct PublishArgs {
|
|||
|
||||
#[arg(long, hide = true)]
|
||||
pub skip_existing: bool,
|
||||
|
||||
/// Perform a dry run without uploading files.
|
||||
///
|
||||
/// When enabled, the command will check for existing files if `--check-url` is provided,
|
||||
/// and will perform validation against the index if supported, but will not upload any files.
|
||||
#[arg(long)]
|
||||
pub dry_run: bool,
|
||||
}
|
||||
|
||||
/// See [PEP 517](https://peps.python.org/pep-0517/) and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue