@@ -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
118128if __name__ == '__main__' :
119129 sys .exit (main ())
0 commit comments