From 8d8281f0c989bd691d7d5a086c728696f124d966 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 3 Sep 2024 12:15:15 -0700 Subject: [PATCH] Specify hash for digest check (#451) * Specify hash for digest check * Fix tagging --- build/azure-pipeline.pre-release.yml | 1 + noxfile.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/azure-pipeline.pre-release.yml b/build/azure-pipeline.pre-release.yml index 4200f526..19bded7d 100644 --- a/build/azure-pipeline.pre-release.yml +++ b/build/azure-pipeline.pre-release.yml @@ -29,6 +29,7 @@ extends: parameters: l10nSourcePaths: ./src standardizedVersioning: true + ghCreateTag: false buildPlatforms: - name: Linux vsceTarget: '' diff --git a/noxfile.py b/noxfile.py index 13a13934..0d89c14a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -80,8 +80,8 @@ def download_url(values): for value in values: with url_lib.urlopen(value["url"]) as response: data = response.read() - name, digest = next(iter(value["hash"].items())) - if hashlib.new(name, data).hexdigest() != digest: + digest = value["hash"]["sha256"] + if hashlib.new("sha256", data).hexdigest() != digest: raise ValueError(f"Failed hash verification for {value['url']}.") print("Download: ", value["url"])