Patch macos_assemble.sh

Temporary fix to prevent build from failing when there are no frameworks
to sign.
This commit is contained in:
Elias Bonnici 2024-08-15 14:00:32 +02:00
parent 3650f8a0cc
commit 1418cab128
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
2 changed files with 19 additions and 0 deletions

View File

@ -57,6 +57,13 @@ jobs:
- run: flutter config --enable-macos-desktop
- run: flutter --version
- name: Apply Flutter Patch
run: |
cd $FLUTTER_ROOT
git apply $GITHUB_WORKSPACE/macos_assemble.patch
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
- name: Run lints/tests
env:
SKIP: ${{ steps.cache-helper.outputs.cache-hit == 'true' && 'mypy,flake8,black,bandit' || ''}}

12
macos_assemble.patch Normal file
View File

@ -0,0 +1,12 @@
diff --git a/packages/flutter_tools/bin/macos_assemble.sh b/packages/flutter_tools/bin/macos_assemble.sh
index 40c6a5051f..a7f05d9113 100755
--- a/packages/flutter_tools/bin/macos_assemble.sh
+++ b/packages/flutter_tools/bin/macos_assemble.sh
@@ -222,6 +222,7 @@ EmbedFrameworks() {
# Iterate through all .frameworks in native assets directory.
for native_asset in "${native_assets_path}"*.framework; do
+ [ -e "$native_asset" ] || continue # Skip when there are no matches.
# Codesign the framework inside the app bundle.
RunCommand codesign --force --verbose --sign "${EXPANDED_CODE_SIGN_IDENTITY}" -- "${xcode_frameworks_dir}/$(basename "$native_asset")"
done