Skip to content

Commit 4ce602f

Browse files
committed
make generate_release_zip use newer url format
1 parent c4c6c63 commit 4ce602f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

generate_release_zip.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
import sys
33
import urllib.request
44
import os
5+
import subprocess
56

67
if len(sys.argv) != 2:
78
print("Usage: {} version_number".format(sys.argv[0]))
89
sys.exit(1)
910

1011
zipf = zipfile.ZipFile("asar"+sys.argv[1]+".zip", 'x', compression=zipfile.ZIP_DEFLATED)
1112

12-
build_server_prefix = "https://random.muncher.se/ftp/asar/windows/xp_compat/build/asar/MinSizeRel/"
13+
branch_name = subprocess.run("git rev-parse --abbrev-ref HEAD", shell=True, stdout=subprocess.PIPE).stdout.decode().strip()
14+
build_server_prefix = "https://random.muncher.se/ftp/asar/windows/"+branch_name+"/win32/build/asar/MinSizeRel/"
1315
with urllib.request.urlopen(build_server_prefix + "asar.exe") as resp:
1416
exe_data = resp.read()
1517
with urllib.request.urlopen(build_server_prefix + "asar.dll") as resp:
@@ -34,4 +36,5 @@
3436

3537
for (dirpath, dirnames, filenames) in os.walk("src/asar-dll-bindings"):
3638
for x in filenames:
37-
zipf.write(dirpath+"/"+x, dirpath.replace("src/asar-dll-bindings", "dll/bindings")+"/"+x)
39+
if not x.endswith(".in"):
40+
zipf.write(dirpath+"/"+x, dirpath.replace("src/asar-dll-bindings", "dll/bindings")+"/"+x)

0 commit comments

Comments
 (0)