Skip to content

Commit 61e107d

Browse files
committed
Update record_mode in Fastfile
1 parent af5ce6d commit 61e107d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fastlane/Fastfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ desc 'Runs tests in Debug config'
125125
lane :test_ui do |options|
126126
next unless is_check_required(sources: sources_matrix[:ui], force_check: @force_check)
127127

128-
remove_snapshots unless options[:record].to_s.empty?
128+
record_mode = !options[:record].to_s.empty?
129+
remove_snapshots if record_mode
129130

130131
update_testplan_on_ci(path: 'StreamChatSwiftUITests/Tests/StreamChatSwiftUI.xctestplan')
131132

@@ -143,10 +144,10 @@ lane :test_ui do |options|
143144
skip_build: options[:skip_build],
144145
number_of_retries: options[:record].to_s.empty? ? 1 : nil,
145146
xcargs: buildcache_xcargs,
146-
fail_build: options[:record].to_s.empty?
147+
fail_build: !record_mode
147148
)
148149

149-
if options[:record] && is_ci
150+
if record_mode && is_ci
150151
png_files = git_status(ext: '.png').map { |_, png| png }.flatten
151152
next if png_files.empty?
152153

0 commit comments

Comments
 (0)