Skip to content

Commit

Permalink
Add missing check-version-bump CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed May 9, 2024
1 parent 1e54331 commit 212cfa5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions check-version-bump.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import tomllib
import sys

from packaging.version import Version
import requests

PYPI_URL = "https://pypi.org/pypi/chatdbg/json"

latest = requests.get(PYPI_URL).json()["info"]["version"]
with open("pyproject.toml", "rb") as f:
current = tomllib.load(f)["project"]["version"]

if Version(current) <= Version(latest):
print(f"Latest version is {latest} on PyPI. Please bump versions.")
sys.exit(1)

0 comments on commit 212cfa5

Please sign in to comment.