From 3c78284c02f019f4766c3d2ab1ed1c2c0b772a07 Mon Sep 17 00:00:00 2001 From: thomasht86 Date: Wed, 18 Sep 2024 07:37:09 +0200 Subject: [PATCH] fix script to check version --- vespacli/utils/check_latest_version.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vespacli/utils/check_latest_version.py b/vespacli/utils/check_latest_version.py index 348017ce..8b5f7c51 100644 --- a/vespacli/utils/check_latest_version.py +++ b/vespacli/utils/check_latest_version.py @@ -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) @@ -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)