diff options
author | Stephan Hartmann <sultan@gentoo.org> | 2023-02-05 16:08:38 +0100 |
---|---|---|
committer | Stephan Hartmann <sultan@gentoo.org> | 2023-02-05 16:09:11 +0100 |
commit | 952b6f7dbf1dd25590e0689751c2d30ef93d1664 (patch) | |
tree | c308cc91d1d0430839bc3b33d5cfe1455948e180 | |
parent | Add package-beta.sh (diff) | |
download | chromium-tools-952b6f7dbf1dd25590e0689751c2d30ef93d1664.tar.gz chromium-tools-952b6f7dbf1dd25590e0689751c2d30ef93d1664.tar.bz2 chromium-tools-952b6f7dbf1dd25590e0689751c2d30ef93d1664.zip |
chrome-bump: migrate away from omahaproxy
Will be shut down end of March 2023.
Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
-rwxr-xr-x | chrome-bump | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/chrome-bump b/chrome-bump index dadc059..7559a29 100755 --- a/chrome-bump +++ b/chrome-bump @@ -74,20 +74,13 @@ pkg_data = \ } } -def getChromeVersionData(base_url, os): +def getChromeVersionData(base_url, os, channel): if not base_url.endswith("/"): url = base_url + "/" - url += f"all.json?os={os}" - + url += f"{os}/channels/{channel}/versions/all/releases?filter=endtime=1970-01-01T00:00:00Z" response = urllib.request.urlopen(url) data = json.loads(response.read()) - return data[0]["versions"] - -def getChromeChannelVersion(versions, channel): - for item in versions: - if item["channel"] == channel: - return item["current_version"] - return None + return data["releases"][0]["version"] def isMajorBump(uversion, tversion): uv_list = uversion.split('.') @@ -117,16 +110,15 @@ def main(): output.einfo("Fetching upstream version information ...") - versions = getChromeVersionData(base_url="https://omahaproxy.appspot.com", - os="linux") - chrome_info = {} for channel in channels: chrome_info[channel] = None for channel in channels: - chrome_info[channel] = getChromeChannelVersion(versions=versions, - channel=channel) + version = getChromeVersionData(base_url="https://versionhistory.googleapis.com/v1/chrome/platforms", + os="linux", + channel=channel) + chrome_info[channel] = version output.einfo("Looking up Chrome version information in tree ...") |