File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
import sys
3
3
import urllib .request
4
4
import os
5
+ import subprocess
5
6
6
7
if len (sys .argv ) != 2 :
7
8
print ("Usage: {} version_number" .format (sys .argv [0 ]))
8
9
sys .exit (1 )
9
10
10
11
zipf = zipfile .ZipFile ("asar" + sys .argv [1 ]+ ".zip" , 'x' , compression = zipfile .ZIP_DEFLATED )
11
12
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/"
13
15
with urllib .request .urlopen (build_server_prefix + "asar.exe" ) as resp :
14
16
exe_data = resp .read ()
15
17
with urllib .request .urlopen (build_server_prefix + "asar.dll" ) as resp :
34
36
35
37
for (dirpath , dirnames , filenames ) in os .walk ("src/asar-dll-bindings" ):
36
38
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 )
You can’t perform that action at this time.
0 commit comments