Skip to content

fix(release): clean dist/ before build so only the new version is published#256

Merged
Eigenwise merged 1 commit into
mainfrom
fix/release-script-stale-dist
May 29, 2026
Merged

fix(release): clean dist/ before build so only the new version is published#256
Eigenwise merged 1 commit into
mainfrom
fix/release-script-stale-dist

Conversation

@Eigenwise

Copy link
Copy Markdown
Owner

Problem

During the v2.8.0 release, uv publish re-attempted uploading every old wheel/sdist sitting in dist/ (2.6.0 through 2.7.5). PyPI ignores already-present files, so it was harmless this time — but it's noisy, slows the publish, and risks confusing failures if an old artifact ever differs.

Root cause: uv build only adds to dist/, and uv publish (no args) uploads everything in dist/. Stale artifacts accumulate across releases.

Fix

Clear dist/ right before uv build, so only the freshly built artifacts for the current version exist when uv publish runs. The dry-run summary lists the new step too.

Verification

  • build_and_deploy.ps1 patch --dry parses and now lists - Clean stale artifacts from dist directory.
  • Dry run makes no changes (confirmed git status clean apart from the script).

🤖 Generated with Claude Code

…lished

uv publish uploads everything in dist/, so stale wheels/sdists from prior
releases were being re-sent to PyPI on every run. Clear dist/ before uv build
so only the freshly built artifacts remain at publish time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Eigenwise Eigenwise merged commit 2e9322a into main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant