Reland: This is to move the zipping logic to the repository under test. (flutter/engine#35751)

This commit is contained in:
godofredoc
2022-08-29 19:18:34 -07:00
committed by GitHub
parent 2b1b303af1
commit ffd9a2fc43

View File

@@ -34,6 +34,8 @@ def main():
parser.add_argument('--x64-out-dir', type=str, required=True)
parser.add_argument('--strip', action="store_true", default=False)
parser.add_argument('--dsym', action="store_true", default=False)
# TODO(godofredoc): Remove after recipes v2 have landed.
parser.add_argument('--zip', action="store_true", default=False)
args = parser.parse_args()
@@ -101,11 +103,11 @@ def process_framework(dst, args, fat_framework, fat_framework_binary):
if args.dsym:
dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM'
subprocess.check_call([DSYMUTIL, '-o', dsym_out, fat_framework_binary])
subprocess.check_call([
'zip', '-r',
'%s/FlutterMacOS.dSYM.zip' % dst,
'%s/FlutterMacOS.dSYM/Contents' % dst
])
if args.zip:
subprocess.check_call([
'zip', '-r', '-y', 'FlutterMacOS.dSYM.zip', 'FlutterMacOS.dSYM'
],
cwd=dst)
if args.strip:
# copy unstripped
@@ -114,6 +116,14 @@ def process_framework(dst, args, fat_framework, fat_framework_binary):
subprocess.check_call(["strip", "-x", "-S", fat_framework_binary])
# Zip FlutterMacOS.framework.
if args.zip:
subprocess.check_call([
'zip', '-r', '-y', 'FlutterMacOS.framework.zip',
'FlutterMacOS.framework'
],
cwd=dst)
if __name__ == '__main__':
sys.exit(main())