1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00
ScreenPlay/Tools/publish_ci.py
2023-08-18 20:23:12 +02:00

25 lines
792 B
Python

import hashlib
import os
def combine_sha256():
files = [
"build-x64-linux-release/ScreenPlay-" +
os.environ['CI_COMMIT_TAG'] + "-x64-linux-release.zip",
"build-x64-windows-release/ScreenPlay-" +
os.environ['CI_COMMIT_TAG'] + "-x64-windows-release.zip",
"build-64-osx-universal-release/ScreenPlay-" +
os.environ['CI_COMMIT_TAG'] + "-x64-osx-universal-release.zip"
]
with open('SHA512-SUMS.txt', 'w') as f_out:
for file in files:
with open(f"{file}.sha256.txt", 'r') as f_in:
sha256_hash = f_in.read().strip()
sha512_hash = hashlib.sha512(sha256_hash.encode()).hexdigest()
f_out.write(f"{sha512_hash} {file}\n")
if __name__ == "__main__":
combine_sha256()