Skip to content

Commit 645678d

Browse files
authored
ci(fastfile): ignore duplicate pod push error (#604)
1 parent 49b6031 commit 645678d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

fastlane/Fastfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,22 @@ platform :ios do
8686
push_git_tags(tag: next_tag)
8787
end
8888

89-
9089
desc "Release pods"
9190
private_lane :release_pods do
9291
AmplifyPods.pods.each do |pod|
9392
pod_path = "/Users/distiller/amplify-ios/#{pod[:spec]}"
9493

9594
UI.message("Pushing pod #{pod[:spec]}")
9695

97-
sh('pod', 'trunk', 'push', pod_path, '--allow-warnings', '--synchronous')
96+
dupe_error = "[!] Unable to accept duplicate entry"
97+
98+
begin
99+
sh('pod', 'trunk', 'push', pod_path, '--allow-warnings', '--synchronous')
100+
rescue => ex
101+
unless ex.to_s.include? dupe_error
102+
raise Exception.new "Unrecoverable error in pod push trunk"
103+
end
104+
end
98105

99106
# TODO: utilize action once the PR for adding `synchronous` options has been merged
100107
# https://github.com/fastlane/fastlane/pull/16698

0 commit comments

Comments
 (0)