From 1a7e90d177ee589991fc15e7a3a46a70c8adf6ef Mon Sep 17 00:00:00 2001 From: godofredoc Date: Tue, 18 Apr 2023 16:40:55 -0700 Subject: [PATCH] Double zip FlutterMacOS.framework.zip. (flutter/engine#41306) This is required to make the artifact consistent with the legacy artifacts while the tool is modified to remove the need of double zipping. Bug: https://github.com/flutter/flutter/issues/124911 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../src/flutter/sky/tools/create_macos_framework.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engine/src/flutter/sky/tools/create_macos_framework.py b/engine/src/flutter/sky/tools/create_macos_framework.py index 8f7a34c19d..8e194ebbe6 100755 --- a/engine/src/flutter/sky/tools/create_macos_framework.py +++ b/engine/src/flutter/sky/tools/create_macos_framework.py @@ -172,6 +172,19 @@ def process_framework(dst, args, fat_framework, fat_framework_binary): 'without_entitlements.txt', ], cwd=dst) + # Double zip to make it consistent with legacy artifacts. + # TODO(fujino): remove this once https://github.com/flutter/flutter/issues/125067 is resolved + subprocess.check_call([ + 'zip', + '-y', + 'FlutterMacOS.framework_.zip', + 'FlutterMacOS.framework.zip', + ], + cwd=dst) + # Use doubled zipped file. + final_src_path = os.path.join(dst, 'FlutterMacOS.framework_.zip') + final_dst_path = os.path.join(dst, 'FlutterMacOS.framework.zip') + shutil.move(final_src_path, final_dst_path) if __name__ == '__main__':