-
Notifications
You must be signed in to change notification settings - Fork 210
Update fastlane, enable local build bumps, and disable local Android uploads #1552
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,20 @@ def get_android_build_number | |
| data["android"]["build"] | ||
| end | ||
|
|
||
| def bump_local_build_number(platform) | ||
| unless %w[ios android].include?(platform) | ||
| UI.user_error!("Invalid platform: #{platform}. Must be 'ios' or 'android'") | ||
| end | ||
|
|
||
| data = read_version_file | ||
| data[platform]["build"] += 1 | ||
|
|
||
| write_version_file(data) | ||
| UI.success("Bumped #{platform} build number to #{data[platform]["build"]}") | ||
|
|
||
| data[platform]["build"] | ||
| end | ||
|
Comment on lines
+47
to
+59
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Race condition risk when bumping multiple platforms concurrently. If iOS and Android builds run in parallel locally (e.g., Scenario:
🔒 Proposed fix using file locking def bump_local_build_number(platform)
unless %w[ios android].include?(platform)
UI.user_error!("Invalid platform: #{platform}. Must be 'ios' or 'android'")
end
+ require 'fileutils'
+ lock_file = "#{VERSION_FILE_PATH}.lock"
+
+ # Acquire exclusive lock
+ File.open(lock_file, File::RDWR|File::CREAT, 0644) do |lock|
+ lock.flock(File::LOCK_EX)
+
- data = read_version_file
- data[platform]["build"] += 1
+ data = read_version_file
+ data[platform]["build"] += 1
- write_version_file(data)
- UI.success("Bumped #{platform} build number to #{data[platform]["build"]}")
+ write_version_file(data)
+ UI.success("Bumped #{platform} build number to #{data[platform]["build"]}")
- data[platform]["build"]
+ data[platform]["build"]
+ end # lock automatically released
end
🤖 Prompt for AI Agents |
||
|
|
||
| def verify_ci_version_match | ||
| # Verify that versions were pre-set by CI | ||
| unless ENV["CI_VERSION"] && ENV["CI_IOS_BUILD"] && ENV["CI_ANDROID_BUILD"] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.