🔥 Exterminate files that aren't Git-tracked

This is a follow-up improvement for
https://github.com/pypa/pip/pull/7624/files
This commit is contained in:
Sviatoslav Sydorenko 2020-01-21 16:58:04 +01:00
parent 7534dccd6c
commit 9f92d3d465
No known key found for this signature in database
GPG Key ID: 9345E8FEA89CA455
1 changed files with 2 additions and 3 deletions

View File

@ -206,9 +206,8 @@ def build_release(session):
session.log("# Checkout the tag")
session.run("git", "checkout", version, external=True, silent=True)
session.log("# Cleanup build/ before building the wheel")
if release.have_files_in_folder("build"):
shutil.rmtree("build")
session.log("# Wipe Git-untracked files before building the wheel")
session.run("git", "clean", "-fxd", external=True, silent=True)
session.log("# Build distributions")
session.run("python", "setup.py", "sdist", "bdist_wheel", silent=True)