update script: find first .crx file in github releases
This commit is contained in:
parent
3201cd4593
commit
1936244f0a
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,10 @@ for ext in exts:
|
|||
if ext["updateMethod"] == "github":
|
||||
with urlopen(ext["updateUrl"]) as r:
|
||||
latest = json.load(r)[0]
|
||||
ext["url"] = latest["assets"][0]["browser_download_url"]
|
||||
for asset in latest["assets"]:
|
||||
if asset["browser_download_url"].endswith(".crx"):
|
||||
ext["url"] = asset["browser_download_url"]
|
||||
break
|
||||
with urlopen(ext["url"]) as blob:
|
||||
sha256 = hashlib.new("SHA256")
|
||||
if blob.status == 200:
|
||||
|
|
Loading…
Reference in a new issue