libsignal-service-java/update-hashes.py
finn 4bc11f17a0 update to unofficial_38
some slightly different patching requirements
2022-01-24 18:52:38 -08:00

29 lines
898 B
Python

#!/usr/bin/env python3
import requests
import hashlib
import json
VERSION = "0.11.0"
TARGETS = [
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"arm-unknown-linux-gnueabihf",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin"
]
urlFormat = "https://gitlab.com/api/v4/groups/6853927/-/packages/maven/org/whispersystems/signal-client-java-{target}/{version}/signal-client-java-{target}-{version}.{ext}"
output = {}
for target in TARGETS:
output[target] = {}
for ext in ["jar", "module"]:
url = urlFormat.format(target=target, version=VERSION, ext=ext)
print("fetching {}".format(url))
r = requests.get(url, allow_redirects=True)
r.raise_for_status()
output[target][ext] = hashlib.sha256(r.content).hexdigest()
with open('hashes.json', 'w') as f:
json.dump(output, f, indent=4)