This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland: This is to move the zipping logic to the repository under test. #35751
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For recipes v2 we'll need a follow up or a work around. The Zip command is correct the problem is in the CAS service that follows symlinks by default. I'm taking a look at the service to see if I can implement some logic to preserve symlinks and if it is too complicated I'll send a follow up to regenerate the symlinks in this script. |
||
| 'FlutterMacOS.framework' | ||
| ], | ||
| cwd=dst) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| sys.exit(main()) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flutter/flutter#110374 (comment)
Is that what this is? Maybe a comment and todo to remove once it's adoped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO added.