Add twine check to publish process (#6770)

This commit is contained in:
Ryan P Kilby 2019-07-01 00:19:12 -07:00 committed by GitHub
parent c04d6eac43
commit e36ba9c46e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,10 @@ if sys.argv[-1] == 'publish':
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
if os.system("twine check dist/*"):
print("twine check failed. Packages might be outdated.")
print("Try using `pip install -U twine wheel`.\nExiting.")
sys.exit()
os.system("twine upload dist/*")
print("You probably want to also tag the version now:")
print(" git tag -a %s -m 'version %s'" % (version, version))