chore: remove duplicate and un-needed files from dist zips (#14882)

* chore: remove duplicate and un-needed files from dist zips

* Strip chromedriver binaries

Also, fix path for files to skip

* Don't strip mksnapshot for now

Mksnapshot needs special handling for arm/arm64 because there is both an x86 and arm/arm64 binary in those cases.
This commit is contained in:
Samuel Attard 2018-10-03 01:12:37 +10:00 committed by John Kleinschmidt
parent 74badfeb56
commit 2b3415dfd8

View file

@ -5,6 +5,7 @@ import sys
import zipfile
LINUX_BINARIES_TO_STRIP = [
'chromedriver',
'electron',
'libffmpeg.so',
'libnode.so'
@ -17,6 +18,8 @@ EXTENSIONS_TO_SKIP = [
PATHS_TO_SKIP = [
'angledata', #Skipping because it is an output of //ui/gl that we don't need
'swiftshader', #Skipping because it is an output of //ui/gl that we don't need
'./libVkLayer_', #Skipping because these are outputs that we don't need
'./VkLayerLayer_', #Skipping because these are outputs that we don't need
]
def skip_path(dep):
@ -57,7 +60,8 @@ def main(argv):
with open(runtime_deps) as f:
for dep in f.readlines():
dep = dep.strip()
dist_files += [dep]
if dep not in dist_files:
dist_files += [dep]
if sys.platform == 'darwin':
mac_zip_results = execute(['zip', '-r', '-y', dist_zip] + dist_files)
else: