]> granicus.if.org Git - graphviz/commitdiff
generate a SHA256 checksum of the release tarball in addition to MD5
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 3 Mar 2021 01:52:41 +0000 (17:52 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 9 Mar 2021 15:43:33 +0000 (07:43 -0800)
Related to #1955.

ci/deploy.py

index 99d49dcd468f18b8cc104ff235561fc39d591e66..6c23ce62eda36d311c2ee71a99f537e471c90f2c 100644 (file)
@@ -76,6 +76,13 @@ def checksum(path: str) -> Generator[str, None, None]:
       f.write(f'{hashlib.md5(data.read()).hexdigest()}  {path}\n')
   yield check
 
+  log.info(f'SHA256 summing {path}')
+  check = f'{path}.sha256'
+  with open(check, 'wt') as f:
+    with open(path, 'rb') as data:
+      f.write(f'{hashlib.sha256(data.read()).hexdigest()}  {path}\n')
+  yield check
+
 def main(args: List[str]) -> int:
 
   # setup logging to print to stderr