Make sure resources gets skipped
This commit is contained in:
parent
806e236850
commit
a82c4923bd
1 changed files with 9 additions and 4 deletions
13
build/zip.py
13
build/zip.py
|
@ -15,15 +15,17 @@ EXTENSIONS_TO_SKIP = [
|
||||||
]
|
]
|
||||||
|
|
||||||
PATHS_TO_SKIP = [
|
PATHS_TO_SKIP = [
|
||||||
'angledata',
|
'angledata', #Skipping because it is an output of //ui/gl that we don't need
|
||||||
'swiftshader',
|
'swiftshader', #Skipping because it is an output of //ui/gl that we don't need
|
||||||
'resources/inspector'
|
'resources/inspector'
|
||||||
]
|
]
|
||||||
|
|
||||||
def skip_path(dep):
|
def skip_path(dep):
|
||||||
should_skip = (
|
should_skip = (
|
||||||
any(dep.startswith(path) for path in PATHS_TO_SKIP) or
|
any(dep.startswith(path) for path in PATHS_TO_SKIP) or
|
||||||
any(dep.endswith(ext) for ext in EXTENSIONS_TO_SKIP))
|
any(dep.endswith(ext) for ext in EXTENSIONS_TO_SKIP))
|
||||||
|
if should_skip:
|
||||||
|
print("Skipping {}".format(dep))
|
||||||
return should_skip
|
return should_skip
|
||||||
|
|
||||||
def strip_binaries(target_cpu, dep):
|
def strip_binaries(target_cpu, dep):
|
||||||
|
@ -69,7 +71,10 @@ def main(argv):
|
||||||
if os.path.isdir(dep):
|
if os.path.isdir(dep):
|
||||||
for root, dirs, files in os.walk(dep):
|
for root, dirs, files in os.walk(dep):
|
||||||
for file in files:
|
for file in files:
|
||||||
z.write(os.path.join(root, file))
|
file_path = os.path.join(root, file)
|
||||||
|
if skip_path(file_path):
|
||||||
|
continue
|
||||||
|
z.write(file_path)
|
||||||
else:
|
else:
|
||||||
z.write(dep)
|
z.write(dep)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue