mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
iOS,macOS: Don't archive extra framework metadata (flutter/engine#54674)
By default, zip archives don't just archive the files themselves, but also bundle extra metadata such as unix owner/group and unix timestamps. None of these is particularly important in the case of Flutter: owner/group information is likely to differ across machines and thus be overridden on the unarchiver's end. The tool checks for file presence and occasionally content hashes. This change results in more reproducible zip archives across runs/machines. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
parent
1c8e23a8fb
commit
ae6c96511e
@ -186,9 +186,10 @@ def create_zip(cwd, zip_filename, paths):
|
||||
"""Creates a zip archive in cwd, containing a set of cwd-relative files.
|
||||
|
||||
In order to preserve the correct internal structure of macOS frameworks,
|
||||
symlinks are preserved.
|
||||
symlinks are preserved (-y). In order to generate reproducible builds,
|
||||
owner/group and unix file timestamps are not included in the archive (-X).
|
||||
"""
|
||||
subprocess.check_call(['zip', '-r', '-y', zip_filename] + paths, cwd=cwd)
|
||||
subprocess.check_call(['zip', '-r', '-X', '-y', zip_filename] + paths, cwd=cwd)
|
||||
|
||||
|
||||
def _dsymutil_path():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user