Skip to content

Commit

Permalink
Update GitHub downloading of binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Labfox committed Sep 11, 2024
1 parent 0527c96 commit 13d50e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions whatsfly/dependencies/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,16 @@ def ensureUsableBinaries():
url = f"https://github.com/Labfox/whatsfly/raw/main/whatsfly/dependencies/{get_dll_filename().replace("whatsmeow/", "whatsmeow/static/")}"
h_url = f"https://github.com/Labfox/whatsfly/raw/main/whatsfly/dependencies/{get_dll_filename(h=True).replace("whatsmeow/", "whatsmeow/static/")}"


download_file(
get_dll_filename().replace("whatsfly/", "").replace("whatsmeow/", ""),
root_dir.replace("dependencies", "")+"/dependencies/whatsmeow/"+get_dll_filename().replace("whatsfly/", "").replace("whatsmeow/", "") )

download_file(
get_dll_filename().replace("whatsfly/", ""),
root_dir.replace("dependencies", "")+"/dependencies/whatsmeow/"+get_dll_filename().replace("whatsfly/", "") )
get_dll_filename(h=True).replace("whatsfly/", "").replace("whatsmeow/", ""),
root_dir.replace("dependencies", "") + "/dependencies/whatsmeow/" + get_dll_filename(h=True).replace("whatsfly/",
"").replace(
"whatsmeow/", ""))


class BuildGoModule(install):
Expand Down
4 changes: 2 additions & 2 deletions whatsfly/dependencies/github_actions_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def download_file(file, path):
github_path = "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"
github_path = "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"

headers = {"Authorization": "token "+github_path}

Expand All @@ -22,4 +22,4 @@ def download_file(file, path):

myzip = ZipFile(BytesIO(r2.content))

myzip.extractall(path=path)
open(path, "wb").write(myzip.open(file).read())

0 comments on commit 13d50e0

Please sign in to comment.