Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve our release process automation #7624

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ 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")
pradyunsg marked this conversation as resolved.
Show resolved Hide resolved

session.log("# Build distributions")
session.run("python", "setup.py", "sdist", "bdist_wheel", silent=True)

Expand Down Expand Up @@ -234,8 +238,8 @@ def upload_release(session):
)
# Sanity check: Make sure the files are correctly named.
expected_distribution_files = [
f"pip-{version}-py2.py3-none-any.whl",
f"pip-{version}.tar.gz",
f"dist/pip-{version}-py2.py3-none-any.whl",
f"dist/pip-{version}.tar.gz",
]
if sorted(distribution_files) != sorted(expected_distribution_files):
session.error(
Expand Down