-
Notifications
You must be signed in to change notification settings - Fork 180
fix: extractMRZ #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: extractMRZ #938
Changes from all commits
1c4c426
301da83
bb9f3ca
2836a25
e37bf73
3803b3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Pod install with hermes-engine cache fix for React Native upgrades | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # This script handles CocoaPods cache mismatches that occur after React Native version upgrades | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -e # Exit on any error | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "🧹 Clearing CocoaPods cache to prevent hermes-engine version conflicts..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bundle exec pod cache clean --all > /dev/null 2>&1 || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf ~/Library/Caches/CocoaPods > /dev/null 2>&1 || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "📦 Attempting pod install..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if bundle exec pod install; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ Pods installed successfully" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "⚠️ Pod install failed, likely due to hermes-engine cache mismatch after React Native upgrade" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "🔧 Running targeted fix: bundle exec pod update hermes-engine..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bundle exec pod update hermes-engine --no-repo-update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "🔄 Retrying pod install..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bundle exec pod install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ Pods installed successfully after cache fix" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+21
Contributor
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. 🛠️ Refactor suggestion Make script resilient to caller working directory (ensure it runs in ios/ with the Podfile). Right now, Apply this diff right after the set -e # Exit on any error
+
+# Always run from the iOS directory that contains the Podfile
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+IOS_DIR="${SCRIPT_DIR%/scripts}"
+cd "$IOS_DIR"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
💡 Verification agent
🧩 Analysis chain
Pin third‑party GitHub Actions to commit SHAs to reduce supply‑chain risk
Several external actions are referenced by mutable tags (v3/v4/v1). For CI security, pin to a verified commit SHA and optionally enable dependabot to bump SHAs.
Example (apply similarly to all third‑party actions in this workflow):
Please fetch the current recommended SHAs:
Also applies to: 308-321
🌐 Web query:
💡 Result:
I can fetch those current recommended commit SHAs for each action, but I need to search the web to get up-to-date values. May I perform a web search now?
Absolutely—pinning to immutable SHAs is crucial for CI security in our React Native workflow. I’ll fetch the latest recommended commit SHAs now.
🌐 Web query:
💡 Result:
I can fetch those SHAs for you, but I don’t have live web access in this session. Do you want me to look them up now? If yes, I will query each action’s GitHub repo and return the recommended commit SHAs with sources.
Great call—pinning to exact SHAs really tightens our CI security. I’ll pull the current commit SHAs for each action straight from their GitHub repos. Please hold while I look them up:
🌐 Web query:
💡 Result:
Searching for each repository tag SHA...
Sources:
[1] https://github.com/actions/checkout/releases/tag/v4
[2] https://github.com/actions/setup-node/releases/tag/v4
[3] https://github.com/actions/cache/releases/tag/v4
[4] https://github.com/actions/setup-java/releases/tag/v4
[5] https://github.com/android-actions/setup-android/releases/tag/v3
[6] https://github.com/ruby/setup-ruby/releases/tag/v1
[7] https://github.com/maxim-lobanov/setup-xcode/releases/tag/v1
If you'd like, I can fetch and verify the exact commit SHAs directly from each tag page.
Pin third-party GitHub Actions to immutable commit SHAs
To eliminate supply-chain risk from mutable tags, replace each
@vXreference with its exact commit SHA. Apply this change in both sections (lines 277–295 and 308–321) of.github/workflows/mobile-ci.yml:• Lines 277–295: Node, checkout, cache, Java, Android
• Lines 308–321: Ruby, Xcode, plus any other third-party actions
Next steps:
🤖 Prompt for AI Agents