From f785bd3ac74af81c131ef1e34e7d793a305d5702 Mon Sep 17 00:00:00 2001 From: "i.o.novikov" Date: Thu, 5 May 2022 01:10:12 +0300 Subject: [PATCH] try push_pod one more times --- fastlane/Fastfile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1ed76f1..4542be7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -88,11 +88,24 @@ lane :lint_fastfile do end def push_podspec(podspec_name) - pod_push( - path: podspec_name, - allow_warnings: true, - skip_tests: true - ) + tries = 6 + for i in 1..tries + begin + pod_push( + path: podspec_name, + allow_warnings: true, + skip_tests: true + ) + break + rescue StandardError => error + if i == tries + raise + end + delay = 3**i + puts "retry pod_push after #{delay}" + sleep(delay) + end + end end def resolve_bump_type(options)