-
Notifications
You must be signed in to change notification settings - Fork 180
Feat/mobile deployment automation #759
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
Conversation
- Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking
## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command
- Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store
- Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md
- Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing
WalkthroughThis update introduces a unified versioning system for iOS and Android builds using a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Fastlane
participant VersionManager
participant App Store / Play Store
User->>GitHub Actions: Trigger mobile-deploy.yml (optionally with test_mode)
GitHub Actions->>Fastlane: Run build lane with test_mode param
Fastlane->>VersionManager: Bump build number in version.json
Fastlane->>Fastlane: Build app (iOS/Android)
alt test_mode is true
Fastlane-->>GitHub Actions: Log build success, skip upload
else test_mode is false
Fastlane->>App Store / Play Store: Upload build
Fastlane->>VersionManager: Update deployment timestamp in version.json
end
GitHub Actions->>GitHub Actions: Commit and push version.json (if changed and not test_mode)
Suggested labels
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 3
🧹 Nitpick comments (6)
.github/workflows/mobile-deploy.yml (2)
326-341: Fix trailing spaces in the iOS commit step.The commit logic is well-structured with proper guards, but static analysis detected trailing spaces that should be removed.
git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Check if version.json has changes
533-548: Fix trailing spaces in the Android commit step.The commit logic is identical to iOS and properly implemented, but contains the same trailing space issue.
git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Check if version.json has changesapp/fastlane/helpers/version_manager.rb (1)
22-27: Consider atomic file writes for better reliability.While the current implementation works, consider using atomic writes to prevent corruption during concurrent access or system interruptions.
def write_version_file(data) - File.write(VERSION_FILE_PATH, JSON.pretty_generate(data) + "\n") + temp_file = "#{VERSION_FILE_PATH}.tmp" + File.write(temp_file, JSON.pretty_generate(data) + "\n") + File.rename(temp_file, VERSION_FILE_PATH) UI.success("Updated version.json") rescue => e UI.user_error!("Failed to write version.json: #{e.message}") endapp/scripts/version.cjs (1)
20-27: Consider atomic file operations for better reliability.Similar to the Ruby helper, consider using atomic writes to prevent file corruption during concurrent access.
function writeVersionFile(data) { try { - fs.writeFileSync(VERSION_FILE, JSON.stringify(data, null, 2) + '\n'); + const tempFile = VERSION_FILE + '.tmp'; + fs.writeFileSync(tempFile, JSON.stringify(data, null, 2) + '\n'); + fs.renameSync(tempFile, VERSION_FILE); } catch (error) { console.error('Error writing version.json:', error); process.exit(1); } }app/fastlane/Fastfile (2)
61-84: Well-implemented test mode for iOS deployment.The test mode feature allows safe testing of the build process without affecting production. The conditional timestamp update ensures version history accuracy.
Consider removing the trailing comma on line 77 to align with the style guide:
- changelog: "", + changelog: ""
284-304: Consistent test mode implementation for Android.The Android test mode matches the iOS implementation perfectly, ensuring a uniform experience across platforms.
Consider removing the trailing comma on line 297:
- aab: android_aab_path, + aab: android_aab_path
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/workflows/mobile-deploy.yml(3 hunks)app/fastlane/Fastfile(6 hunks)app/fastlane/helpers.rb(1 hunks)app/fastlane/helpers/version_manager.rb(1 hunks)app/scripts/mobile-deploy-confirm.cjs(3 hunks)app/scripts/version.cjs(1 hunks)app/version.json(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
app/version.json (1)
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/workflows/mobile-deploy.yml
[error] 332-332: trailing spaces
(trailing-spaces)
[error] 539-539: trailing spaces
(trailing-spaces)
🪛 RuboCop (1.75.5)
app/fastlane/Fastfile
[convention] 77-77: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 297-297: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
🔇 Additional comments (20)
app/version.json (1)
1-10: Clean centralized version management structure.The JSON structure is well-organized and serves as an effective single source of truth for build numbers and deployment timestamps across both platforms. The initial build numbers (iOS: 148, Android: 82) suggest a smooth migration from existing systems.
app/fastlane/helpers.rb (1)
16-16: Consistent helper integration pattern.The version manager helper is properly integrated following the established pattern used by other helpers in the codebase. The require_relative and extend approach maintains consistency.
Also applies to: 24-24
.github/workflows/mobile-deploy.yml (3)
39-43: Well-structured test mode input parameter.The test mode input provides essential functionality for safe deployment testing without affecting production stores. The default false value ensures safe behavior.
318-324: Effective conditional deployment logic for iOS.The test mode implementation correctly skips TestFlight upload while maintaining the full build process. The messaging clearly indicates the mode being used.
525-531: Consistent Android test mode implementation.The Android implementation mirrors the iOS approach effectively, maintaining consistency across platforms.
app/fastlane/helpers/version_manager.rb (4)
10-10: Proper file path resolution.Using
File.expand_pathwith__dir__ensures reliable path resolution across different execution contexts.
12-20: Robust file reading with comprehensive error handling.The error handling covers both missing files and JSON parsing errors, providing clear user feedback through Fastlane's UI system.
46-53: Clean build number increment logic.The build number bump methods follow a consistent pattern with proper logging and return values. The increment logic is straightforward and reliable.
Also applies to: 55-62
81-94: Well-designed synchronization method.The sync method provides clear visibility into current state and returns structured data for use in Fastlane workflows.
app/scripts/version.cjs (4)
1-8: Clean script setup with proper path resolution.The shebang, license header, and path configuration follow best practices for Node.js CLI scripts.
10-18: Robust file reading with proper error handling.The error handling provides clear feedback and appropriate exit codes for CLI usage.
71-87: Well-structured information display function.The getCurrentInfo function provides comprehensive version information with clear formatting.
89-112: Clean CLI interface with helpful usage instructions.The command-line interface is intuitive and provides clear usage information for all supported commands.
app/scripts/mobile-deploy-confirm.cjs (4)
243-256: LGTM! Clean implementation of version data reader.The function properly handles errors and returns null on failure, allowing graceful degradation.
258-279: Well-implemented time formatting function.The function provides user-friendly time elapsed display with appropriate granularity levels.
354-377: Excellent enhancement to version display.The build number range display (current → next) and deployment history provide valuable context during deployment confirmation. The fallback logic ensures backward compatibility.
379-396: Smart consistency validation between version.json and platform files.These checks help catch configuration drift early and prevent deployment issues. The warnings clearly indicate which values are mismatched.
app/fastlane/Fastfile (3)
138-145: Excellent centralization of iOS build number management.Moving build number management to the helper module and version.json provides a single source of truth and eliminates manual version conflicts.
252-259: Consistent Android version management implementation.The Android version code management mirrors the iOS approach, maintaining consistency across platforms.
139-139: Helper methods verified: definitions present and correctly loaded
- Located
bump_ios_build_number,bump_android_build_number, andupdate_deployment_timestamp(platform)inapp/fastlane/helpers/version_manager.rb.- The
require_relative "helpers"inFastfilewill load them as expected.No further action required.
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/mobile-deploy.yml (1)
318-324: Quote the boolean input more defensively
github.event.inputs.test_modeis surfaced to the shell as an empty string when the caller omits the input (even though you provided a default).
Using a bare string comparison (== "true") will work, but guarding for both"true"and"false"makes the intent explicit and avoids surprises if the default ever changes to a real boolean (true) that renders to"1".-if [ "${{ github.event.inputs.test_mode }}" == "true" ]; then +if [ "${{ github.event.inputs.test_mode }}" = "true" ]; then # explicit string compare(One
=is POSIX-portable; two is Bash-specific).
Not critical, but worth tightening up.Also applies to: 535-541
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/mobile-deploy.yml(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/workflows/mobile-deploy.yml
[error] 342-342: trailing spaces
(trailing-spaces)
[error] 559-559: trailing spaces
(trailing-spaces)
🔇 Additional comments (1)
.github/workflows/mobile-deploy.yml (1)
39-44: Nice addition – input name & docs are clear
Thetest_modeswitch is self-explanatory and uses proper defaults. 👍
- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)
Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts.
The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed.
- Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget
Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI.
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.
Actionable comments posted: 0
♻️ Duplicate comments (4)
.github/workflows/mobile-deploy.yml (4)
398-404: Address the jq availability issue on macOS runnersThis duplicates a previous review comment about jq not being available on macOS runners, which will cause the iOS job to fail.
Install jq conditionally for macOS runners:
+ # Install jq if not present (macOS runner) + if ! command -v jq >/dev/null 2>&1; then + brew install jq + fi NEW_VERSION=$(jq -r .version version.json)Or use a Node.js alternative:
- NEW_VERSION=$(jq -r .version version.json) + NEW_VERSION=$(node -pe 'require("./version.json").version')
712-718: Same jq issue affects Android jobThe Android job has the same jq availability issue as the iOS job on line 713.
Apply the same fix as recommended for the iOS job:
- NEW_VERSION=$(jq -r .version version.json) + NEW_VERSION=$(node -pe 'require("./version.json").version')
406-421: Potential race condition with concurrent commitsThis duplicates a previous review comment about concurrent commits when platform == "both", which can cause push failures due to non-fast-forward errors.
Consider serializing the commit step into a separate job:
commit-version-changes: needs: [build-ios, build-android] runs-on: ubuntu-latest if: success() && github.event.inputs.test_mode != 'true' steps: - uses: actions/checkout@v4 - name: Commit all version changes run: | # Combined commit logic here
720-735: Same race condition issue in Android jobThe Android job has the same concurrent commit issue as the iOS job.
Apply the same serialization fix as recommended for the iOS job.
🧹 Nitpick comments (3)
.github/actions/mobile-setup/action.yml (1)
62-62: Fix trailing spaces flagged by static analysisThe YAML linter has identified trailing spaces that should be removed for code cleanliness.
Apply this diff to remove trailing spaces:
- + - + - + - +Also applies to: 66-66, 82-82, 85-85
.github/workflows/mobile-deploy.yml (1)
10-10: Fix trailing spaces throughout the workflowMultiple trailing spaces are flagged by the YAML linter and should be removed for code cleanliness.
The static analysis tool identified trailing spaces on multiple lines. Please remove these trailing spaces to maintain code quality standards.
Also applies to: 120-120, 412-412, 484-484
app/fastlane/Fastfile (1)
77-77: Fix trailing commas flagged by RuboCopThe Ruby linter has identified trailing commas in method calls that should be removed according to the project's style guide.
Apply this diff to remove trailing commas:
- changelog: "", + changelog: "" - title: "#{APP_NAME}-#{package_version}-#{result[:build_number]}.ipa", + title: "#{APP_NAME}-#{package_version}-#{result[:build_number]}.ipa" - aab: android_aab_path, + aab: android_aab_path - title: "#{APP_NAME}-#{package_version}-#{version_code}.aab", + title: "#{APP_NAME}-#{package_version}-#{version_code}.aab"Also applies to: 93-93, 299-299, 315-315
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
app/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
.github/actions/mobile-setup/action.yml(1 hunks).github/workflows/mobile-deploy.yml(9 hunks)app/fastlane/Fastfile(6 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/actions/mobile-setup/action.yml
[error] 62-62: trailing spaces
(trailing-spaces)
[error] 66-66: trailing spaces
(trailing-spaces)
[error] 82-82: trailing spaces
(trailing-spaces)
[error] 85-85: trailing spaces
(trailing-spaces)
.github/workflows/mobile-deploy.yml
[error] 10-10: trailing spaces
(trailing-spaces)
[error] 120-120: trailing spaces
(trailing-spaces)
[error] 127-127: trailing spaces
(trailing-spaces)
[error] 133-133: trailing spaces
(trailing-spaces)
[error] 412-412: trailing spaces
(trailing-spaces)
[error] 484-484: trailing spaces
(trailing-spaces)
[error] 489-489: trailing spaces
(trailing-spaces)
[error] 494-494: trailing spaces
(trailing-spaces)
[error] 499-499: trailing spaces
(trailing-spaces)
[error] 573-573: trailing spaces
(trailing-spaces)
[error] 580-580: trailing spaces
(trailing-spaces)
[error] 586-586: trailing spaces
(trailing-spaces)
[error] 726-726: trailing spaces
(trailing-spaces)
[error] 756-756: trailing spaces
(trailing-spaces)
[error] 761-761: trailing spaces
(trailing-spaces)
[error] 766-766: trailing spaces
(trailing-spaces)
[error] 771-771: trailing spaces
(trailing-spaces)
[error] 776-776: trailing spaces
(trailing-spaces)
🪛 RuboCop (1.75.5)
app/fastlane/Fastfile
[convention] 77-77: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 93-93: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 299-299: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 315-315: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (16)
.github/actions/mobile-setup/action.yml (3)
50-57: Excellent addition of strict bundler configuration for CI environmentsThe deployment mode configuration ensures consistent gem installations across different environments and prevents local development configuration from affecting CI builds.
68-81: Great error handling for dependency consistencyThe detailed error messages provide clear guidance for developers when lock files are out of sync. The
--immutableflag ensures builds fail fast when dependencies are inconsistent.
88-101: Solid Ruby gem installation with retry logicThe job parallelization and retry logic will improve build reliability, especially in CI environments where network issues can cause transient failures.
.github/workflows/mobile-deploy.yml (6)
46-50: Excellent addition of test_mode parameterThis feature allows safe testing of the entire deployment pipeline without actually uploading to app stores. The boolean default of false ensures production safety.
10-16: Smart cache versioning strategyThe versioned cache keys with global and component-specific versions provide fine-grained control over cache invalidation when needed.
77-107: Comprehensive caching implementation for iOSThe multi-layered caching for Yarn, Ruby gems, and CocoaPods will significantly improve build performance by avoiding redundant downloads.
520-560: Excellent caching strategy for Android build dependenciesThe caching of Yarn, Ruby gems, Gradle, and Android NDK will substantially reduce build times, especially for the large NDK component.
613-613: Smart conditional NDK installationThe cache-aware NDK installation only runs when the cache misses, which optimizes build time by skipping unnecessary downloads.
479-502: Excellent cache monitoring for performance insightsThe cache size reporting helps track dependency growth and stay within GitHub Actions cache limits.
app/fastlane/Fastfile (7)
61-63: Clean test mode parameter handlingThe options parameter parsing with string comparison is appropriate for Fastlane's parameter passing system.
66-79: Excellent conditional upload logic for test modeThe test mode implementation properly skips TestFlight uploads while still completing the build process and providing feedback about the generated IPA.
140-147: Great migration to centralized version managementThe switch from manual build number handling to the version manager helper provides better consistency and eliminates potential race conditions between platforms.
81-84: Smart deployment timestamp trackingThe conditional timestamp update ensures accurate deployment history while respecting the test mode flag.
87-99: Proper Slack notification handling in test modeThe conditional Slack notifications prevent false deployment alerts during testing while maintaining proper CI/CD notifications for actual deployments.
254-261: Consistent Android version managementThe Android implementation mirrors the iOS approach, using the same version manager helper for consistency across platforms.
286-301: Well-implemented Android test mode logicThe test mode implementation for Android matches the iOS approach, providing consistent behavior across platforms.
The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys.
The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android.
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.
Actionable comments posted: 0
♻️ Duplicate comments (4)
.github/workflows/mobile-deploy.yml (4)
399-399:jqis not available on macOS runners – step will fail
jqships onubuntu-latestbut not onmacos-latest. When the iOS job runs, the "Update package.json version" step will exit withcommand not found.-# Get new version from version.json -NEW_VERSION=$(jq -r .version version.json) +# Install jq if not present (macOS runner) +if ! command -v jq >/dev/null 2>&1; then + brew install jq +fi +NEW_VERSION=$(jq -r .version version.json)Add the installation guard (or switch to
node -pe 'require("./version.json").version') to keep the workflow green.
713-713: Samejqavailability issue in Android jobApply the same fix here as well:
-NEW_VERSION=$(jq -r .version version.json) +# Install jq if not present +if ! command -v jq >/dev/null 2>&1; then + apt-get update && apt-get install -y jq +fi +NEW_VERSION=$(jq -r .version version.json)
406-421: Concurrent commits from iOS & Android jobs will race and cause push failuresWhen
platform == both, the two jobs run in parallel and each tries to:
- bump
package.json- push to the same branch
The second pusher will receive
[rejected] → non-fast-forwardand the job will ❌.Mitigation options:
# 1) Serialize the commit in a follow-up job needs: [build-ios, build-android] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: echo "single commit logic here …" # 2) Or rebase-then-push in each job git fetch origin $GITHUB_REF git rebase origin/$GITHUB_REF git push --force-with-leasePick whichever better fits your release flow, but handle the race explicitly.
720-735: Same race condition applies to Android jobApply the same race condition fix here as well to prevent concurrent push failures.
🧹 Nitpick comments (2)
.github/workflows/mobile-deploy.yml (1)
10-10: Remove trailing spacesYAMLlint detected trailing spaces on multiple lines. These should be removed for code quality.
Run this command to fix all trailing spaces:
sed -i 's/[[:space:]]*$//' .github/workflows/mobile-deploy.ymlAlso applies to: 119-119, 126-126, 133-133, 412-412, 484-484, 489-489, 494-494, 499-499, 572-572, 579-579, 586-586, 726-726, 756-756, 761-761, 766-766, 771-771, 776-776
app/fastlane/Fastfile (1)
77-77: Remove trailing commas in method callsRuboCop flagged trailing commas after the last parameter in method calls. These should be removed for consistency with the Ruby style guide.
- groups: ENV["IOS_TESTFLIGHT_GROUPS"].split(","), + groups: ENV["IOS_TESTFLIGHT_GROUPS"].split(",")Apply similar fixes to the other flagged lines.
Also applies to: 93-93, 299-299, 315-315
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/mobile-deploy.yml(9 hunks)app/fastlane/Fastfile(6 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/workflows/mobile-deploy.yml
[error] 10-10: trailing spaces
(trailing-spaces)
[error] 119-119: trailing spaces
(trailing-spaces)
[error] 126-126: trailing spaces
(trailing-spaces)
[error] 133-133: trailing spaces
(trailing-spaces)
[error] 412-412: trailing spaces
(trailing-spaces)
[error] 484-484: trailing spaces
(trailing-spaces)
[error] 489-489: trailing spaces
(trailing-spaces)
[error] 494-494: trailing spaces
(trailing-spaces)
[error] 499-499: trailing spaces
(trailing-spaces)
[error] 572-572: trailing spaces
(trailing-spaces)
[error] 579-579: trailing spaces
(trailing-spaces)
[error] 586-586: trailing spaces
(trailing-spaces)
[error] 726-726: trailing spaces
(trailing-spaces)
[error] 756-756: trailing spaces
(trailing-spaces)
[error] 761-761: trailing spaces
(trailing-spaces)
[error] 766-766: trailing spaces
(trailing-spaces)
[error] 771-771: trailing spaces
(trailing-spaces)
[error] 776-776: trailing spaces
(trailing-spaces)
🪛 RuboCop (1.75.5)
app/fastlane/Fastfile
[convention] 77-77: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 93-93: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 299-299: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 315-315: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-android
- GitHub Check: build-ios
- GitHub Check: build
🔇 Additional comments (10)
.github/workflows/mobile-deploy.yml (5)
46-50: Well-structured test mode implementationThe boolean
test_modeinput with a sensible default provides clean conditional logic for skipping store uploads during testing. This aligns perfectly with the CI/CD best practices for safe deployment testing.
11-16: Excellent caching strategy with versioned keysThe introduction of versioned cache keys (
GH_CACHE_VERSION,GH_YARN_CACHE_VERSION, etc.) provides fine-grained control over cache invalidation. This approach allows selective cache busting when needed without affecting unrelated caches.
384-390: Clean test mode implementation in iOS jobThe conditional logic properly passes the
test_modeparameter to Fastlane and provides clear logging messages. This makes the test flow transparent and easy to debug.
698-704: Consistent test mode implementation in Android jobThe Android job mirrors the iOS implementation perfectly, maintaining consistency across both platforms.
479-501: Excellent cache monitoring implementationThe cache size reporting provides valuable insights for optimization and helps track GitHub Actions cache usage against the 10GB limit. This is a thoughtful addition for operational visibility.
app/fastlane/Fastfile (5)
61-84: Well-structured test mode implementation for iOSThe iOS lane cleanly handles test mode with proper conditional logic:
- Clear test mode detection from options
- Appropriate logging and user feedback
- Conditional TestFlight upload
- Deployment timestamp tracking
The implementation maintains the same flow while providing safe testing capabilities.
140-147: Excellent centralized version managementThe switch from direct Xcode project parsing to the version.json-based approach via
bump_ios_build_numberis a significant improvement. This centralizes version management and makes it more reliable across platforms.
221-223: Consistent Android test mode integrationThe Android lane follows the same pattern as iOS, passing the test_mode option through to the upload method. This consistency makes the codebase more maintainable.
254-261: Android version management alignmentThe Android build number management now uses the same centralized approach as iOS via
bump_android_build_number. This ensures consistent version handling across both platforms.
286-301: Clean Android test mode logicThe Android upload method properly implements test mode with clear conditional logic, appropriate logging, and maintains the same user experience as the iOS implementation.
- Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms
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.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/mobile-deploy.yml (3)
77-88: Cache root-levelnode_modulesas wellOnly the
app/node_modulesfolder is cached.
If any tooling (e.g. React Native CLI, eslint, TypeScript) is installed in the repository root, those packages will be re-downloaded every run.path: | ${{ env.APP_PATH }}/node_modules + ${{ env.WORKSPACE }}/node_modules # root workspace ~/.cache/yarnAdding the root folder keeps both hoisted and workspace-level installs hot, shaving one to two minutes off cold boots.
744-770:yarn versioncan create an implicit git tag – disable it explicitly
--no-git-tag-versionis present, 👍, but Yarn 1 still opens an interactive
editor unless-yis supplied. Non-interactive runners may hang.- yarn version --new-version "$NEW_VERSION" --no-git-tag-version + yarn version --new-version "$NEW_VERSION" --no-git-tag-version -yAdding
-ymakes the update fully non-interactive.
10-16: Clean up trailing spaces – YAML-lint is currently redLines 10-16 (and several others called out by YAML-lint) contain stray spaces.
These break “git blame” hygiene and can trip strict linters in CI.Run
yamllint -d relaxed .github/workflows/mobile-deploy.ymlor enable your
editor’s “trim trailing whitespace on save”.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/mobile-deploy.yml(9 hunks)app/fastlane/helpers/version_manager.rb(1 hunks)app/scripts/version.cjs(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/fastlane/helpers/version_manager.rb
🚧 Files skipped from review as they are similar to previous changes (1)
- app/scripts/version.cjs
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/workflows/mobile-deploy.yml
[error] 10-10: trailing spaces
(trailing-spaces)
[error] 119-119: trailing spaces
(trailing-spaces)
[error] 126-126: trailing spaces
(trailing-spaces)
[error] 133-133: trailing spaces
(trailing-spaces)
[error] 455-455: trailing spaces
(trailing-spaces)
[error] 460-460: trailing spaces
(trailing-spaces)
[error] 465-465: trailing spaces
(trailing-spaces)
[error] 470-470: trailing spaces
(trailing-spaces)
[error] 543-543: trailing spaces
(trailing-spaces)
[error] 550-550: trailing spaces
(trailing-spaces)
[error] 557-557: trailing spaces
(trailing-spaces)
[error] 698-698: trailing spaces
(trailing-spaces)
[error] 703-703: trailing spaces
(trailing-spaces)
[error] 708-708: trailing spaces
(trailing-spaces)
[error] 713-713: trailing spaces
(trailing-spaces)
[error] 718-718: trailing spaces
(trailing-spaces)
[error] 728-728: trailing spaces
(trailing-spaces)
[error] 747-747: trailing spaces
(trailing-spaces)
[error] 750-750: trailing spaces
(trailing-spaces)
[error] 758-758: trailing spaces
(trailing-spaces)
[error] 764-764: trailing spaces
(trailing-spaces)
[error] 774-774: trailing spaces
(trailing-spaces)
[error] 778-778: trailing spaces
(trailing-spaces)
[error] 785-785: trailing spaces
(trailing-spaces)
[error] 796-796: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-android
- GitHub Check: build-ios
🔇 Additional comments (1)
.github/workflows/mobile-deploy.yml (1)
771-801:needs.*.resultinterpolation happens at YAML level, not bash – avoid double quotingInside the shell script the values are already expanded. Surrounding them with
quotes creates things like"success"(with the quotes) which will never match.-if [ "${{ needs.build-ios.result }}" = "success" ] +if [ {{ needs.build-ios.result }} = success ]Same for the Android branch.
This tiny tweak guarantees the condition evaluates as intended.Likely an incorrect or invalid review comment.
| run: | | ||
| echo "🔍 Checking if lock files are in sync with dependency files..." | ||
| # For yarn workspaces, yarn.lock is at root | ||
| if [ ! -f "${{ env.WORKSPACE }}/yarn.lock" ]; then | ||
| echo "❌ ERROR: yarn.lock file is missing at workspace root!" | ||
| echo "Run 'yarn install' at the repository root and commit the yarn.lock file." | ||
| exit 1 | ||
| fi | ||
| # Gemfile.lock is in app directory | ||
| if [ ! -f "${{ env.APP_PATH }}/Gemfile.lock" ]; then | ||
| echo "❌ ERROR: Gemfile.lock file is missing!" | ||
| echo "Run 'bundle install' in the app directory and commit the Gemfile.lock file." | ||
| exit 1 | ||
| fi | ||
| echo "✅ Lock files exist" |
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.
🛠️ Refactor suggestion
Lock-file check should fail on drift, not just absence
The script only asserts the presence of yarn.lock / Gemfile.lock, but does not detect when the lock files are out of date.
Consider switching to deterministic validators so the build fails on drift:
# Yarn
yarn install --immutable --immutable-cache
# Bundler
bundle check || (echo 'Run `bundle install` and commit Gemfile.lock'; exit 1)This prevents “it works on my machine” surprises at deploy time.
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 119-119: trailing spaces
(trailing-spaces)
[error] 126-126: trailing spaces
(trailing-spaces)
[error] 133-133: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy.yml around lines 117 to 134, the current
script only checks if yarn.lock and Gemfile.lock files exist but does not verify
if they are up to date with the dependencies. To fix this, replace the presence
checks with deterministic validation commands: run 'yarn install --immutable
--immutable-cache' to ensure yarn.lock is consistent, and run 'bundle check' for
Gemfile.lock, exiting with an error message if the check fails. This will cause
the build to fail on lock file drift, preventing deployment issues.
- Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI
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.
Actionable comments posted: 3
🧹 Nitpick comments (2)
app/scripts/mobile-deploy-confirm.cjs (2)
243-256: Enhance error handling in getVersionJsonDataThe function correctly handles the basic case but could provide more specific error information for debugging deployment issues.
Consider this improvement for better error categorization:
function getVersionJsonData() { const versionJsonPath = path.join(__dirname, FILE_PATHS.VERSION_JSON); try { const versionData = JSON.parse(fs.readFileSync(versionJsonPath, 'utf8')); return versionData; } catch (error) { - console.warn(`Warning: Could not read version.json: ${error.message}`); + if (error.code === 'ENOENT') { + console.warn(`Warning: version.json not found at ${versionJsonPath}`); + } else if (error instanceof SyntaxError) { + console.warn(`Warning: Invalid JSON in version.json: ${error.message}`); + } else { + console.warn(`Warning: Could not read version.json: ${error.message}`); + } return null; } }
258-279: Add edge case handling for getTimeAgoThe time formatting logic is solid but should handle invalid timestamps more gracefully.
Consider adding validation for malformed timestamps:
function getTimeAgo(timestamp) { if (!timestamp) return 'Never deployed'; + const then = new Date(timestamp); + if (isNaN(then.getTime())) { + return 'Invalid deployment timestamp'; + } + const now = new Date(); - const then = new Date(timestamp); const diffMs = now - then; + + if (diffMs < 0) { + return 'Future deployment timestamp'; + } + const diffHours = Math.floor(diffMs / (1000 * 60 * 60)); const diffDays = Math.floor(diffHours / 24);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/mobile-deploy.yml(9 hunks)app/scripts/mobile-deploy-confirm.cjs(3 hunks)app/scripts/version.cjs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- app/scripts/version.cjs
- .github/workflows/mobile-deploy.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 GitHub Check: lint
app/scripts/mobile-deploy-confirm.cjs
[warning] 405-405:
Missing radix parameter
[warning] 395-395:
Missing radix parameter
[warning] 375-375:
Missing radix parameter
[warning] 357-357:
Missing radix parameter
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
app/scripts/mobile-deploy-confirm.cjs (2)
23-23: Version.json integration looks goodThe addition of the VERSION_JSON path constant properly integrates with the new centralized version management system described in the PR objectives.
286-293: getCurrentVersions integration is well-structuredThe addition of version.json data to the versions object maintains backward compatibility while extending functionality.
| const currentBuild = versions.android.versionCode; | ||
| const nextBuild = versions.versionJson | ||
| ? versions.versionJson.android.build + 1 | ||
| : parseInt(currentBuild) + 1; | ||
| const lastDeployed = versions.versionJson | ||
| ? getTimeAgo(versions.versionJson.android.lastDeployed) | ||
| : 'Unknown'; | ||
|
|
||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version: ${versions.android.version}`, | ||
| ); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${versions.android.versionCode}`, | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${currentBuild} → ${nextBuild}`, | ||
| ); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Last Android Deploy: ${lastDeployed}`, | ||
| ); | ||
| } |
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.
Fix missing radix parameter in parseInt call
Same issue as the iOS section - missing radix parameter on line 375.
const nextBuild = versions.versionJson
? versions.versionJson.android.build + 1
- : parseInt(currentBuild) + 1;
+ : parseInt(currentBuild, 10) + 1;Apply the same validation improvement as suggested for iOS.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const currentBuild = versions.android.versionCode; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.android.build + 1 | |
| : parseInt(currentBuild) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.android.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version: ${versions.android.version}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${versions.android.versionCode}`, | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Last Android Deploy: ${lastDeployed}`, | |
| ); | |
| } | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.android.build + 1 | |
| : parseInt(currentBuild, 10) + 1; |
🧰 Tools
🪛 GitHub Check: lint
[warning] 375-375:
Missing radix parameter
🤖 Prompt for AI Agents
In app/scripts/mobile-deploy-confirm.cjs around lines 372 to 389, the parseInt
call on line 375 is missing the radix parameter, which can lead to incorrect
parsing. Fix this by adding the radix parameter 10 to the parseInt call to
ensure decimal interpretation, matching the validation improvement applied in
the iOS section.
| const currentBuild = versions.ios.build; | ||
| const nextBuild = versions.versionJson | ||
| ? versions.versionJson.ios.build + 1 | ||
| : parseInt(currentBuild) + 1; | ||
| const lastDeployed = versions.versionJson | ||
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | ||
| : 'Unknown'; | ||
|
|
||
| console.log( | ||
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | ||
| ); | ||
| console.log(`${CONSOLE_SYMBOLS.APPLE} iOS Build: ${versions.ios.build}`); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | ||
| ); | ||
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); |
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.
Fix missing radix parameter in parseInt call
The parseInt call on line 357 lacks a radix parameter, which can lead to unexpected behavior with octal numbers.
const nextBuild = versions.versionJson
? versions.versionJson.ios.build + 1
- : parseInt(currentBuild) + 1;
+ : parseInt(currentBuild, 10) + 1;Also consider adding validation for non-numeric build values:
const nextBuild = versions.versionJson
? versions.versionJson.ios.build + 1
- : parseInt(currentBuild, 10) + 1;
+ : (isNaN(parseInt(currentBuild, 10)) ? 1 : parseInt(currentBuild, 10) + 1);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const currentBuild = versions.ios.build; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.ios.build + 1 | |
| : parseInt(currentBuild) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} iOS Build: ${versions.ios.build}`); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); | |
| const currentBuild = versions.ios.build; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.ios.build + 1 | |
| : (isNaN(parseInt(currentBuild, 10)) ? 1 : parseInt(currentBuild, 10) + 1); | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); |
🧰 Tools
🪛 GitHub Check: lint
[warning] 357-357:
Missing radix parameter
🤖 Prompt for AI Agents
In app/scripts/mobile-deploy-confirm.cjs around lines 354 to 368, the parseInt
call on line 357 is missing the radix parameter, which can cause incorrect
parsing of the build number. Fix this by adding a radix of 10 to the parseInt
call. Additionally, add validation to ensure the build value is numeric before
parsing to prevent errors from non-numeric inputs.
| // Check for potential issues | ||
| if (versions.versionJson) { | ||
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | ||
| const jsonBuild = versions.versionJson.ios.build; | ||
| const actualBuild = parseInt(versions.ios.build); | ||
| if (jsonBuild !== actualBuild) { | ||
| console.log( | ||
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | ||
| const jsonBuild = versions.versionJson.android.build; | ||
| const actualBuild = parseInt(versions.android.versionCode); | ||
| if (jsonBuild !== actualBuild) { | ||
| console.log( | ||
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | ||
| ); | ||
| } | ||
| } | ||
| } |
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.
Fix missing radix parameters in consistency checks
The parseInt calls on lines 395 and 405 are missing radix parameters, which could cause incorrect mismatch detection.
if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) {
const jsonBuild = versions.versionJson.ios.build;
- const actualBuild = parseInt(versions.ios.build);
+ const actualBuild = parseInt(versions.ios.build, 10);
if (jsonBuild !== actualBuild) {
console.log(
`\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`,
);
}
}
if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) {
const jsonBuild = versions.versionJson.android.build;
- const actualBuild = parseInt(versions.android.versionCode);
+ const actualBuild = parseInt(versions.android.versionCode, 10);
if (jsonBuild !== actualBuild) {
console.log(
`\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`,
);
}
}Consider adding validation for non-numeric values:
+ if (isNaN(actualBuild) || isNaN(jsonBuild)) {
+ console.log(
+ `\n${CONSOLE_SYMBOLS.WARNING} iOS build numbers contain non-numeric values`,
+ );
+ return;
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Check for potential issues | |
| if (versions.versionJson) { | |
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.ios.build; | |
| const actualBuild = parseInt(versions.ios.build); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.android.build; | |
| const actualBuild = parseInt(versions.android.versionCode); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| } | |
| // Check for potential issues | |
| if (versions.versionJson) { | |
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.ios.build; | |
| - const actualBuild = parseInt(versions.ios.build); | |
| + const actualBuild = parseInt(versions.ios.build, 10); | |
| + if (isNaN(actualBuild) || isNaN(jsonBuild)) { | |
| + console.log( | |
| + `\n${CONSOLE_SYMBOLS.WARNING} iOS build numbers contain non-numeric values`, | |
| + ); | |
| + return; | |
| + } | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.android.build; | |
| - const actualBuild = parseInt(versions.android.versionCode); | |
| + const actualBuild = parseInt(versions.android.versionCode, 10); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| } |
🧰 Tools
🪛 GitHub Check: lint
[warning] 405-405:
Missing radix parameter
[warning] 395-395:
Missing radix parameter
🤖 Prompt for AI Agents
In app/scripts/mobile-deploy-confirm.cjs around lines 391 to 412, the parseInt
calls used to convert build numbers lack radix parameters, which can lead to
incorrect parsing. Fix this by adding a radix of 10 to both parseInt calls to
ensure decimal interpretation. Additionally, add validation to check if the
parsed values are valid numbers before comparing them to avoid false mismatch
detection.
* audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * merge dev to main (#657) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) * Dev (#677) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * refactor deployment scripts (#678) * feat: add register eu id instances (#682) * feat: add register eu id instances * feat: add new instances * chore: update scripts * chore: fix sig alg * chore: rm circuits * update the smart contracts scripts (#684) * remove the && false * fix euid (#685) * keep build and version in sync (#686) * fix env set to null * fix: circuit for register ci (#690) * fix: circuit for register ci * fix: rm duplicate workflow_dispatch * feat: add better error handling (#691) * fix: older than bug (#692) * bump: sdk/[email protected] * fix: config not found bug * decrease parallel circuits to 3 * ci: add prettier check for contract sdk (#602) * Add Prettier check for code formatting in contracts workflow * Update contracts workflow: remove unused checkout action and fix build step name * Run formatter * Run lint fix * chore: update build_cpp to 2 concurrent builds * Contract/fix sdk (#695) * fix contracts sdk * fix contracts sdk * Fix contract example v2 (#694) * feat: add verification config ID functionality to Airdrop, HappyBirthday, and SelfIdentityERC721 contracts * Run formatter * SEL-473: Add lint rule for BUSL headers (#698) * chore(app): enforce license header via eslint * update lock and order * fix formatting * SEL-444: Fix android cloud backup (#697) * feat(android): migrate google backup * update lock and google services config * add bulk format command * backup fixes * working drive settings!!!!!!!! * remove unneeded intent filter * add tests * coderabbit feedback * coderabbit feedback * abstract google method * coderabbit feedback and fix test * more coderabbit suggestions and tests fixes * chore: update relayer verifier enum to include the register circuits (#699) * fix env sample (#700) * Abstract iOS cloud backup logic (#701) * feat(ios): abstract cloud backup logic * prettier and cr feedback * tested on iOS and android and functionality is the same * Fix navigation serialization warnings (#702) * test: cover modal callbacks * coderabbit feedback * feat(app): clarify passport linking (#704) * Show NFC support message (#708) * SEL-425: Add document management analytics events (#706) * Add document management analytics * coderabbit feedback * SEL-447: Improve proof failure feedback (#707) * feat: flag stale proofs as failed * make a constant * format * SEL-330: Add backup check after verification (#711) * route to save phrase if backup disabled * format * SEL-483: Implement recovery backup prompts (#710) * feat: prompt users to back up account * feat: prompt users to back up account * format * Add tests for recovery prompt logic * more lint updates * fix imports * fix unused import * update cursor suggestions * implement coderabbit suggestions and fix tests * SEL-472: Enable production push notifications (#703) * chore: leave sandbox apns token comment * tweak entitlement * coderabbit ai feedback * firebase tweaks * Chore: ensure there is an extra empty line after the license declaration (#712) * ensure there is an extra empty line after the license declaration * ignore adding header to cjs config files * add missing license header * ignore linting metro config * bump version and add mainnet hub address * Bugfix: Show recovery prompt only when user has docs (#714) * feat(app): prompt recovery only when docs exist * cr feedbacl * SEL-487: Prompt user to backup recovery phrase before registering (#715) * feat: prompt backup before registration * coderabbit feedback * fix tests * coderabbitai feedback and fix tests * Remove StartupFlushPolicy (#717) * SEL-479: Multi-ID onboarding mvp flow (#688) * save new launch screen wip * save wip * finalize launch look * replace launch screen * rename * update camera onboarding and scan screen * update tips looks * update nfc scan issue screens * update copy * add launch screen todo * fix casing * update launch screen link, copy and add tracking event * bump project version to match app store * match app store * updated supported bio id link * add dialog message support back in * cr feedback * bump version and build * update images * tweak animation layout * loop with setTimeout * fix onboarding assets (#719) * feat: add flag to use PACEPolling (#680) * feat: add flag to use PACEPolling * fix: santize before storing in store * bump ios build number and update podfile lock * prettier * bump build * feat: add flag to use PACEPolling * fix: santize before storing in store * bump ios build number and update podfile lock * prettier * bump build --------- Co-authored-by: Justin Hernandez <[email protected]> * fix backup button label (#722) * update version to 2.6.0 and bump build numbers (#721) * SEL-179 & SEL-312: Add gitleaks and GitGuardian scanning (#705) * chore: add secret scanning setup * fix: correct GitGuardian action path * cr feedbacak * test husky commit * pr feedback * fix workflows * tweaks * fix versions * upgrade: migrate from husky v8 to v9 - Update husky from ^8.0.0 to ^9.1.7 - Change prepare script from 'husky install' to 'husky' - Remove v8 hook structure (shebang, husky.sh sourcing) - Delete .husky/_/ directory as it's not needed in v9 - Maintain gitleaks pre-commit hook functionality * coderabbitai feedback * add bulk sort command (#723) * feat(app): redirect empty docs to launch (#725) * Apply consistent safe area padding across screens (#726) * Contracts/update verifiers (#729) * update the verifiers * update deployment script * update deployment script and deploy to prod * prettier run write * App/ethcc fixes (#730) * fix mock data screen * increase timout between dsc and register proof * fix the isUserRegisteredWithAlternativeCSCA function * yarn nice * allow people to switch to a mock id (#732) * yarn nice * chore: update default config id method * chore: use named exports * Update README.md * Temporarily disable recovery redirect and reminder prompts (#733) * Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)" This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31. * revert update * fix safe area context pkg * Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)" This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31. * fix old flow * more silent tests * update lock files * hard code return * SEL-486: Fix unwrap DO (#718) * update podfile: unwrapDO * update lock * bump version and builds * bump build; forgot to enable logs * fix version to not interfere with release --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-494: Update proving machine event tracking (#734) * Add extensive proof analytics instrumentation * prettier and sort events by key name * remove loading screen race condition redirect (#736) * Chore: new build for v2.6.0 ios 145 android 81 (#737) * bump version and build * properly bump app * bump build * Improve manual mobile deploy workflow and docs (#728) * Add basic Fastlane helper tests * Upgrade fastlane and enhance helper tests (#738) * simplify mobile deploy pipelines and make them manual. update readme * update fastlane dev readme * update tests and add helper script * cr feedback, update tests, revert circuits package.json sort change * tweaks * fix slack * cr feedback and fixes * add better cjs eslint support * save wip. add confirmation check script. update scripts * remove auto increment feature * migrate readme items over to DEV due to fastlane auto regen docs flow * use regular xcode * fix hermes compiler path * coderabbit feedback * reinstall when on local dev * fix upload * simplify * simplify confirmation feedback with tests * fix mobile deploys * cr feedback * test iOS building * fix trigger logic * cr feedback * updates * fix env var * fix order * re-enable upload to testflight for ios * updated notes * chore: update readme * Bugfix: android deeplinks (#742) * bugfix: deep linking * add android manifest test * bump build and version * format readme * fix deeplink genmockiddoc * add the gender to the deeplink optoin * bump version (#743) * fix the female bug * bump build 148 (#744) * SEL-496: Add Firebase Remote Config and dev feature flag screen (#735) * feat: add remote config support * update lock * tweak config logic. add feature flag viewing screen * add tests * allow for local overriding of feature flags * save local override work * save wip * clean up ui * update screen to handle multi value types * fix tests * cr feedback and fix tests * remote config upates. fix tests, codex feedback * Improve AGENTS workflow notes (#747) * clarify workflow instructions * agents feedback * Address minor mobile deployment bugs (#745) * feat: improve deployment tooling * cr feedback * for temp testing * clean build artifacts after deploy * add deploy source * uncomment ios commands * Add tests for minor deployment fixes (#750) * Add test coverage for deployment scripts and Fastfile * format * increase github check to 5 minutes * Extend platform build file tests (#748) * Add build file tests * cr feedback * Add proving machine tests (#749) * Add actor mock helper and tests * format tests * fix tests * wip fix tests * address cr feedback * Add thorough test cases for mobile app (#752) * Add actor mock helper and tests * format tests * fix tests * Revert non-app tests * update tests * fix tests * coderabbit feedback * revert change * remove spurious tests * don't use crypto in core sdk * Start of Web App (#689) * Add .cursorignore to optimize AI editor performance and security (#758) Prevents Cursor AI from accessing sensitive files (keys, credentials, deployment configs) and large generated artifacts that slow down indexing. Keeps source code accessible while excluding build outputs, node_modules, and circuit/contract compilation artifacts across the monorepo. * SEL-504: fix fonts and some styles (#762) * fix fonts and some styles * dry config * fix some warnings * lets start with coverage for app (#763) * lets start with coverage for app * lint * better setup * SEL-559: Update td1 regex (#760) * feat: update td1 regex * update review comments * fix: NPE on expirationDate regex * fix user defined data (#766) * fix: name formatting for middle name * bump: sdk/core to 1.0.7-beta.1 * Feat/retrieve OFAC trees from api (#769) * retrieve the ofac trees from the api * remove the ofac trees from the common repo * fix ofac test * yarn nice * yarn nice * yarn nice * refactor ofac fetching * Release new build v2.6.2 (#779) * bump version and build * ignore podfile * Remove failing version test (#780) * remove version check test * remove test all together * SEL-269: Update ESLint rules & lock prettier config (#781) * Update ESLint config and lock prettier config * Refine ESLint config and fix lint issues * Apply eslint fixes * Use socketIo alias (#782) * move gesture handler * save wip updates * fix svg imports * update tsconfig * eslint updates * eslint fixes * improve ignore folders * coderabbit feedback * Fix style prop shorthands (#787) * Expand view style props * Expand remaining style props * update types * fix pipeline * fix test env check * nicer casting * fix booleans * update deeplink url handling and make it more robust * add socket error handler * Add COSE signature verification tests (#788) * Update ESLint config and lock prettier config * Refine ESLint config and fix lint issues * save wip updates * eslint updates * eslint fixes * Add COSE signature verification tests * fix tests * SEL-553: Show NFC Progress (#764) * feat: add haptics * fix: BAC FAILED error event * update lock file --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-566: Navigate Home based on document validity (#768) * feat: navigate home if atleast one valid document is present * update comments * Review: Remove unnecessary continue statement * feat: add tracking * SEL-544: Generate Mock DSC on mock-passport flow (#772) * feat: Generate mock DSC on mock-passport flow * Remove console log * yarn format * revert to mock dsc generation * SEL-570: Display user ID in prove screen (#790) * Display user ID on prove screen * Add user ID formatting util and tests * Clarify user ID formatting * fix nice * add tests and save toggle wip * update tests based on feedback * say connected wallet when wallet * fix: Add localhost validation to prevent invalid endpoint usage in QR Code SDK (#794) * Feat/mobile deployment automation (#759) * feat: add version management system with build number tracking - Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking * feat: integrate version.json with Fastlane deployment process ## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command * feat: enhance deploy confirmation with version.json info * fix: use ENV variable directly in increment_build_number to avoid secret masking * fix: correct xcodeproj path for GitHub Actions workflow * feat: add test mode to workflow for safe testing - Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store * fix: use gradle_file_path instead of gradle_file for increment_version_code * fix: use gsub to remove ../ prefix for CI compatibility * chore: remove accidentally committed files - Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md * feat: auto-commit version.json after successful deployment - Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing * feat : update package.json in build step using npm version * feat: add comprehensive caching to mobile deployment workflow - Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min) * fix: move bundler config after Ruby setup in mobile-setup action * fix: rename cache env vars to avoid Yarn conflicts Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts. * fix: remove bundler deployment mode to allow Gemfile updates The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed. * feat: implement strict lock file enforcement (Option 1) - Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget * fix: update Gemfile.lock for CI environment Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI. * fix: correct yarn.lock path for monorepo workspace The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys. * fix: handle both boolean and string test_mode parameter The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android. * fix: address code review feedback for mobile deployment workflow - Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms * fix: formatting and linting issues - Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI --------- Co-authored-by: Jayaditya Gupta <[email protected]> * fix: increment iOS build number * fix: bump app version to 2.6.3 for iOS release * App/deeplink callback (#789) * add deepllinkCallback support * bump package version * yarn nice * fix background countdown * cast the URL to prevent malicious code introduction * fix: use cleanDocumentNumber (#784) * increment iOS bundle version * Feat/push to dev main (#767) * feat: add version management system with build number tracking - Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking * feat: integrate version.json with Fastlane deployment process ## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command * feat: enhance deploy confirmation with version.json info * fix: use ENV variable directly in increment_build_number to avoid secret masking * fix: correct xcodeproj path for GitHub Actions workflow * feat: add test mode to workflow for safe testing - Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store * fix: use gradle_file_path instead of gradle_file for increment_version_code * fix: use gsub to remove ../ prefix for CI compatibility * chore: remove accidentally committed files - Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md * feat: auto-commit version.json after successful deployment - Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing * feat : update package.json in build step using npm version * feat: add comprehensive caching to mobile deployment workflow - Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min) * fix: move bundler config after Ruby setup in mobile-setup action * fix: rename cache env vars to avoid Yarn conflicts Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts. * fix: remove bundler deployment mode to allow Gemfile updates The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed. * feat: implement strict lock file enforcement (Option 1) - Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget * fix: update Gemfile.lock for CI environment Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI. * fix: correct yarn.lock path for monorepo workspace The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys. * fix: handle both boolean and string test_mode parameter The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android. * fix: address code review feedback for mobile deployment workflow - Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms * fix: formatting and linting issues - Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI * feat: implement automated branch-based mobile deployments - Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main - Update mobile-deploy.yml to support workflow_call for reusability - Add deployment_track, version_bump, and auto_deploy parameters - Create new Fastlane lanes (deploy_auto) for iOS and Android - Implement smart version bumping based on PR labels (major/minor/patch) - Add graceful error handling for Play Store permission issues - Enhance Slack notifications with deployment track information This enables automatic deployments when PRs are merged: - dev branch → internal testing track - main branch → production track - Skip deployment with [skip-deploy] in PR or no-deploy label * feat: add automated git tagging and release system - Add automatic git tagging for production deployments (v2.5.5, platform-specific tags) - Create GitHub releases with changelogs for production deployments - Add manual release script (yarn release) for version bumping and tagging - Implement simple changelog generation from git history - Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md - Update app/README.md with deployment commands and workflows This completes the release automation system requested in the ticket for manual tagging and versioning with automated changelogs and release notes. --------- Co-authored-by: Jayaditya Gupta <[email protected]> * Implement basic code splitting * cm feedback * update lock * yarn nice * add typing to crypto loader * fix type. more opportunities * lint suggestions * build dependencies before linting * fix build command * save updated imports * update build checks * fix import * fix imports and test * fix install commands * Update Gemfile.lock to exclude nokogiri in CI environments - Regenerated Gemfile.lock with GITHUB_ACTIONS=true to match the conditional nokogiri exclusion in the Ge…
Overview
This PR streamlines the mobile deployment workflow by implementing automated version management through a centralized
version.json file, eliminating manual version entry and reducing deployment errors.
🎯 Key Features
{
"ios": {
"build": 148,
"lastDeployed": "2025-01-10T19:28:00Z"
},
"android": {
"build": 82,
"lastDeployed": null
}
}
📁 Files Changed
Core Version Management:
Workflow Updates:
Fastlane Integration:
🔄 Deployment Flow
🛠️ Workflow Trigger Commands
Using GitHub CLI (gh)
Trigger iOS deployment in test mode
gh workflow run mobile-deploy.yml --repo selfxyz/self --ref feat/mobile-deployment-automation -f platform=ios -f
test_mode=true
Trigger Android deployment in test mode
gh workflow run mobile-deploy.yml --repo selfxyz/self --ref feat/mobile-deployment-automation -f platform=android -f
test_mode=true
Trigger both platforms in test mode
gh workflow run mobile-deploy.yml --repo selfxyz/self --ref feat/mobile-deployment-automation -f platform=both -f
test_mode=true
Trigger production deployment (no test mode)
gh workflow run mobile-deploy.yml --repo selfxyz/self --ref main -f platform=both -f test_mode=false
Parameters Explained:
🚀 How to Use
- Go to Actions → Mobile App Deployments
- Select platform (iOS/Android/Both)
- Leave test_mode unchecked
- Run workflow
- Same as above but ✅ check "Test mode"
- Builds will run but won't upload to stores
🧪 Testing Done
📋 Next Steps
After this PR:
Summary by CodeRabbit
New Features
Chores