Skip to content

Commit

Permalink
Publish: Ignore non-matching files
Browse files Browse the repository at this point in the history
Fixes #8944
  • Loading branch information
konstin committed Nov 10, 2024
1 parent a2e90b7 commit 6ea4cc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/uv-publish/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,10 @@ pub fn files_for_publishing(
else {
continue;
};
if filename == ".gitignore" {
let Some(dist_filename) = DistFilename::try_from_normalized_filename(&filename) else {
debug!("Not a distribution filename: `{filename}`");
continue;
}
let dist_filename = DistFilename::try_from_normalized_filename(&filename)
.ok_or_else(|| PublishError::InvalidFilename(dist.clone()))?;
};
files.push((dist, filename, dist_filename));
}
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/publish/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def build_project_at_version(

# Build the project
check_call([uv, "build"], cwd=project_root)
# Test that we ignore unknown any file.
project_root.joinpath("dist").joinpath(".DS_Store").touch()

return project_root

Expand Down

0 comments on commit 6ea4cc6

Please sign in to comment.