mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
build: apply additional compression to dsym on upload (#48930)
build: use tar.xz compression
This commit is contained in:
@@ -84,6 +84,12 @@ def make_zip(zip_file_path, files, dirs):
|
||||
zip_file.close()
|
||||
|
||||
|
||||
def make_tar_xz(tar_file_path, files, dirs):
|
||||
safe_unlink(tar_file_path)
|
||||
allfiles = files + dirs
|
||||
execute(['tar', '-cJf', tar_file_path] + allfiles)
|
||||
|
||||
|
||||
def rm_rf(path):
|
||||
try:
|
||||
shutil.rmtree(path)
|
||||
|
||||
@@ -6,7 +6,7 @@ import os
|
||||
import sys
|
||||
|
||||
from lib.config import PLATFORM
|
||||
from lib.util import scoped_cwd, get_electron_version, make_zip, \
|
||||
from lib.util import scoped_cwd, get_electron_version, make_zip, make_tar_xz, \
|
||||
get_electron_branding, get_out_dir, execute
|
||||
|
||||
ELECTRON_VERSION = get_electron_version()
|
||||
@@ -27,16 +27,15 @@ def main():
|
||||
make_zip(zip_file, licenses, dirs)
|
||||
|
||||
if PLATFORM == 'darwin':
|
||||
dsym_name = 'dsym.zip'
|
||||
dsym_name = 'dsym.tar.xz'
|
||||
with scoped_cwd(args.build_dir):
|
||||
dsyms = glob.glob('*.dSYM')
|
||||
snapshot_dsyms = ['v8_context_snapshot_generator.dSYM']
|
||||
for dsym in snapshot_dsyms:
|
||||
if (dsym in dsyms):
|
||||
dsyms.remove(dsym)
|
||||
dsym_zip_file = os.path.join(args.build_dir, dsym_name)
|
||||
print('Making dsym zip: ' + dsym_zip_file)
|
||||
make_zip(dsym_zip_file, licenses, dsyms)
|
||||
dsym_tar_file = os.path.join(args.build_dir, dsym_name)
|
||||
make_tar_xz(dsym_tar_file, licenses, dsyms)
|
||||
dsym_snapshot_name = 'dsym-snapshot.zip'
|
||||
dsym_snapshot_zip_file = os.path.join(args.build_dir, dsym_snapshot_name)
|
||||
print('Making dsym snapshot zip: ' + dsym_snapshot_zip_file)
|
||||
|
||||
Reference in New Issue
Block a user