mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
chore(ci): add checksums for nightly uploads (#4766)
This commit is contained in:
parent
a33e118f10
commit
a391630e50
8
.github/uploader.py
vendored
8
.github/uploader.py
vendored
@ -1,6 +1,7 @@
|
||||
from os import system as run, listdir, remove
|
||||
from json import load
|
||||
import tgconfig
|
||||
import hashlib
|
||||
|
||||
with open("../.github/commit.json") as f:
|
||||
data = load(f)
|
||||
@ -18,6 +19,13 @@ if len(signed_files):
|
||||
for file in unsigned_files:
|
||||
remove(file)
|
||||
|
||||
with open("checksums", "w") as checksums:
|
||||
for file in signed_files or unsigned_files:
|
||||
with open(file, "rb") as apk:
|
||||
bytes = apk.read()
|
||||
sha256hash = hashlib.sha256(bytes).hexdigest()
|
||||
checksums.write(sha256hash + " " + apk.name + "\n")
|
||||
|
||||
if tgconfig.GH_REPO.lower() == "libre-tube/libretube":
|
||||
run("git add -f *")
|
||||
run(f"git commit -m \"{message}\"")
|
||||
|
Loading…
Reference in New Issue
Block a user