pilot/lib/pilot/build_manager.rb in fastlane-2.28.8 vs pilot/lib/pilot/build_manager.rb in fastlane-2.28.9
- old
+ new
@@ -49,11 +49,11 @@
build ||= Spaceship::TestFlight::Build.latest(app_id: app.apple_id, platform: fetch_app_platform)
if build.nil?
UI.user_error!("No build to distribute!")
end
- if should_update_app_test_information(options)
+ if should_update_app_test_information?(options)
app_test_info = Spaceship::TestFlight::AppTestInfo.find(app_id: build.app_id)
app_test_info.test_info.feedback_email = options[:beta_app_feedback_email] if options[:beta_app_feedback_email]
app_test_info.test_info.description = options[:beta_app_description] if options[:beta_app_description]
begin
app_test_info.save_for_app!(app_id: build.app_id)
@@ -61,11 +61,11 @@
rescue => ex
UI.user_error!("Could not set beta_app_feedback_email and/or beta_app_description: #{ex}")
end
end
- if should_update_build_information(options)
+ if should_update_build_information?(options)
begin
build.update_build_information!(whats_new: options[:changelog])
UI.success "Successfully set the changelog for build"
rescue => ex
UI.user_error!("Could not set changelog: #{ex}")
@@ -118,14 +118,14 @@
build.session_count]
return row
end
- def should_update_build_information(options)
- options[:changelog].to_s.length
+ def should_update_build_information?(options)
+ options[:changelog].to_s.length > 0
end
- def should_update_app_test_information(options)
+ def should_update_app_test_information?(options)
options[:beta_app_description].to_s.length > 0 || options[:beta_app_feedback_email].to_s.length > 0
end
def distribute_build(uploaded_build, options)
UI.message("Distributing new build to testers: #{uploaded_build.train_version} - #{uploaded_build.build_version}")