Keep Flutter.framework binaries writable so they can be code signed (#39539)

This commit is contained in:
Jenn Magder 2019-09-03 18:00:45 -07:00 committed by GitHub
parent f9bc89932c
commit 72cacb4040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -532,7 +532,6 @@ task:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
- dart --enable-asserts dev/bots/test.dart
- name: add2app-macos
skip: true # https://github.com/flutter/flutter/issues/39507
env:
SHARD: add2app_test
setup_xcpretty_script:

View File

@ -142,11 +142,13 @@ BuildApp() {
mkdir "${derived_dir}/engine"
RunCommand cp -r -- "${flutter_podspec}" "${derived_dir}/engine"
RunCommand cp -r -- "${flutter_framework}" "${derived_dir}/engine"
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \;
# Make non-binary files read-only to discourage editing headers, but allow binary code-signing.
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec grep -Il '.' {} \; | xargs chmod a-w
else
RunCommand rm -rf -- "${derived_dir}/Flutter.framework"
RunCommand cp -r -- "${flutter_framework}" "${derived_dir}"
RunCommand find "${derived_dir}/Flutter.framework" -type f -exec chmod a-w "{}" \;
# Make non-binary files read-only to discourage editing headers, but allow binary code-signing.
RunCommand find "${derived_dir}/Flutter.framework" -type f -exec grep -Il '.' {} \; | xargs chmod a-w
fi
RunCommand pushd "${project_path}" > /dev/null