Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ platform :ios do
push_git_tags
pod_lib_lint(allow_warnings: true)
pod_push(allow_warnings: true)
# pod trunk push can return a server error even when the publish succeeds.
# Trunk info can lag after a successful push, so retry with backoff before
# failing loudly.
max_attempts = 5
sleep_seconds = 15
published = false
max_attempts.times do |attempt|
trunk_info = sh("pod trunk info Auth0", log: false, error_callback: ->(_) {})
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
if trunk_info&.lines&.any? { |line| line.match?(/(?<![.\d])#{Regexp.escape(version)}(?![.\d-])/) }
published = true
break
end
if attempt < max_attempts - 1
UI.message("Auth0 #{version} not yet visible on trunk (attempt #{attempt + 1}/#{max_attempts}), retrying in #{sleep_seconds}s...")
sleep(sleep_seconds)
end
end
if published
UI.success "Auth0 #{version} is published on CocoaPods trunk ✓"
else
UI.user_error!("pod trunk push reported an error and Auth0 #{version} was NOT found on trunk after #{max_attempts} attempts. Manual intervention required.")
end
Comment thread
coderabbitai[bot] marked this conversation as resolved.
end

desc 'Generate versioned API documentation into a temporary build directory'
Expand Down
Loading