From 2f556e20537f56a282553b785450b80389ede5c6 Mon Sep 17 00:00:00 2001 From: Godofredo Contreras Date: Fri, 26 Aug 2022 14:59:11 -0700 Subject: [PATCH 1/2] Reland: This is to move the zipping logic to the repository under test. Bug: flutter/flutter#81855 Bug: flutter/flutter#/110374 --- sky/tools/create_macos_framework.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sky/tools/create_macos_framework.py b/sky/tools/create_macos_framework.py index c34e20216ca1d..a959370eaedab 100755 --- a/sky/tools/create_macos_framework.py +++ b/sky/tools/create_macos_framework.py @@ -34,6 +34,7 @@ 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) + parser.add_argument('--zip', action="store_true", default=False) args = parser.parse_args() @@ -101,11 +102,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 +115,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()) From 85251e0c628ad7aacf91a20bfa5548e37136c87b Mon Sep 17 00:00:00 2001 From: Godofredo Contreras Date: Mon, 29 Aug 2022 16:57:25 -0700 Subject: [PATCH 2/2] Add todo. --- sky/tools/create_macos_framework.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sky/tools/create_macos_framework.py b/sky/tools/create_macos_framework.py index a959370eaedab..801e32f6e0355 100755 --- a/sky/tools/create_macos_framework.py +++ b/sky/tools/create_macos_framework.py @@ -34,6 +34,7 @@ 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()