Skip to content

Commit

Permalink
fix(CI): json access in script checking the current pypi version (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasht86 authored Sep 18, 2024
1 parent f424d41 commit 2f8be91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vespacli/utils/check_latest_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
def get_latest_pypi_version() -> version.Version:
response = requests.get(
"https://pypi.org/simple/vespacli/",
headers={"Accept": "application/vnd.pypi.simple.v1+json"}
headers={"Accept": "application/vnd.pypi.simple.v1+json"},
)
latest_version = response.json()["releases"][-1]["version"]
latest_version = response.json()["versions"][-1]
return version.parse(latest_version)


Expand All @@ -22,7 +22,7 @@ def get_latest_github_version() -> version.Version:
gh_release = get_latest_github_version()
pypi_release = get_latest_pypi_version()
if gh_release > pypi_release:
print(f"{0}" % gh_release)
print(f"{gh_release}")
else:
print("NA")
sys.exit(0)

0 comments on commit 2f8be91

Please sign in to comment.