remove old build artifacts before uv build

This commit is contained in:
Aran-Fey
2025-03-12 22:59:40 +01:00
parent 250db124f8
commit 7f1f47b2d9

View File

@@ -170,6 +170,12 @@ def make_new_release() -> None:
subprocess.run(["git", "push"], check=True)
# Publish
# Remove old distributions, otherwise uv in its unending wisdom will try to
# upload them again and crash
for path in (Path(__file__).absolute().parent.parent / "dist").iterdir():
path.unlink()
subprocess.run(["uv", "build"], check=True)
subprocess.run(["uv", "publish"], check=True)