Skip to content

Commit 3997742

Browse files
committed
fix publish errors
1 parent 1dfdfa8 commit 3997742

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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.")

0 commit comments

Comments
 (0)