Skip to content

Commit 282d51b

Browse files
godofredocharoross
authored andcommitted
Reland: This is to move the zipping logic to the repository under test. (flutter#35751)
1 parent 7e69043 commit 282d51b

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

sky/tools/create_macos_framework.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def main():
3434
parser.add_argument('--x64-out-dir', type=str, required=True)
3535
parser.add_argument('--strip', action="store_true", default=False)
3636
parser.add_argument('--dsym', action="store_true", default=False)
37+
# TODO(godofredoc): Remove after recipes v2 have landed.
38+
parser.add_argument('--zip', action="store_true", default=False)
3739

3840
args = parser.parse_args()
3941

@@ -101,11 +103,11 @@ def process_framework(dst, args, fat_framework, fat_framework_binary):
101103
if args.dsym:
102104
dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM'
103105
subprocess.check_call([DSYMUTIL, '-o', dsym_out, fat_framework_binary])
104-
subprocess.check_call([
105-
'zip', '-r',
106-
'%s/FlutterMacOS.dSYM.zip' % dst,
107-
'%s/FlutterMacOS.dSYM/Contents' % dst
108-
])
106+
if args.zip:
107+
subprocess.check_call([
108+
'zip', '-r', '-y', 'FlutterMacOS.dSYM.zip', 'FlutterMacOS.dSYM'
109+
],
110+
cwd=dst)
109111

110112
if args.strip:
111113
# copy unstripped
@@ -114,6 +116,14 @@ def process_framework(dst, args, fat_framework, fat_framework_binary):
114116

115117
subprocess.check_call(["strip", "-x", "-S", fat_framework_binary])
116118

119+
# Zip FlutterMacOS.framework.
120+
if args.zip:
121+
subprocess.check_call([
122+
'zip', '-r', '-y', 'FlutterMacOS.framework.zip',
123+
'FlutterMacOS.framework'
124+
],
125+
cwd=dst)
126+
117127

118128
if __name__ == '__main__':
119129
sys.exit(main())

0 commit comments

Comments
 (0)