pilot/lib/pilot/build_manager.rb in fastlane-2.29.0.beta.20170427010043 vs pilot/lib/pilot/build_manager.rb in fastlane-2.29.0.beta.20170428010037
- old
+ new
@@ -35,16 +35,21 @@
end
UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform)
- distribute(options, latest_build)
+ distribute(options, build: latest_build)
end
- def distribute(options, build)
+ def distribute(options, build: nil)
start(options)
if config[:apple_id].to_s.length == 0 and config[:app_identifier].to_s.length == 0
config[:app_identifier] = UI.input("App Identifier: ")
+ end
+
+ 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_build_information(options)
build.update_build_information!(whats_new: options[:changelog], description: options[:beta_app_description], feedback_email: options[:beta_app_feedback_email])
UI.success "Successfully set the changelog and/or description for build"