Skip to content

Commit

Permalink
Add twine check to publish process (encode#6770)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpkilby authored and sigvef committed Dec 3, 2022
1 parent 7a68531 commit 9529f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def get_version(package):
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))
Expand Down

0 comments on commit 9529f80

Please sign in to comment.