File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,17 +55,19 @@ jobs:
5555 run : |
5656 python3 - <<'PYEOF'
5757 import sys, json, urllib.request
58- from packaging.version import Version
5958
6059 new_version = "${{ github.event.inputs.version }}"
6160
61+ def parse(v):
62+ return tuple(int(x) for x in v.split("."))
63+
6264 try:
6365 with urllib.request.urlopen("https://pypi.org/pypi/vizion3d/json") as r:
6466 data = json.loads(r.read())
6567 current_version = data["info"]["version"]
6668 print(f"Current PyPI version : {current_version}")
6769 print(f"Requested version : {new_version}")
68- if Version (new_version) <= Version (current_version):
70+ if parse (new_version) <= parse (current_version):
6971 print(f"::error::Version {new_version} must be strictly greater than the current PyPI version {current_version}")
7072 sys.exit(1)
7173 print("Version check passed.")
You can’t perform that action at this time.
0 commit comments