build: fix success message in verify_release

Prior to #1946 the verify_release script was successful if both PyPI
and GitHub release artifacts matched the local build.

Now, if the `--skip-pypi` option is provided, the script can also
be successful if only the GitHub release artifacts match the local
build.

This commit splits the final success message in two separate
success messages, one for PyPI and one for GitHub.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
This commit is contained in:
Lukas Puehringer 2022-04-27 12:10:51 +02:00
parent a50062f668
commit e7544bfbe7

View file

@ -172,15 +172,16 @@ def main() -> int:
# This is expected while build is not reproducible
finished("ERROR: PyPI artifacts do not match built release")
success = False
else:
finished(f"PyPI artifacts match the built release")
progress("Downloading release from GitHub")
if not verify_github_release(build_version, build_dir):
# This is expected while build is not reproducible
finished("ERROR: GitHub artifacts do not match built release")
success = False
if success:
finished("Github and PyPI artifacts match the built release")
else:
finished(f"GitHub artifacts match the built release")
return 0 if success else 1