pilot/lib/pilot/tester_exporter.rb in fastlane-2.65.0 vs pilot/lib/pilot/tester_exporter.rb in fastlane-2.66.0
- old
+ new
@@ -10,25 +10,27 @@
require 'csv'
app_filter = (config[:apple_id] || config[:app_identifier])
if app_filter
app = Spaceship::Application.find(app_filter)
- testers = Spaceship::Tunes::Tester::External.all_by_app(app.apple_id)
+
+ testers = Spaceship::TestFlight::Tester.all(app_id: app.apple_id)
else
- testers = Spaceship::Tunes::Tester::External.all
+ testers = Spaceship::TestFlight::Tester.all
end
file = config[:testers_file_path]
CSV.open(file, "w") do |csv|
- csv << ['First', 'Last', 'Email', 'Groups', 'Devices', 'Installed Version', 'Install Date']
+ csv << ['First', 'Last', 'Email', 'Groups', 'Installed Version', 'Install Date']
testers.each do |tester|
- group_names = tester.groups_list(';') || ""
- install_version = tester.latest_build || ""
+ group_names = tester.groups.join(";") || ""
+ latest_install_info = tester.latest_install_info
+ install_version = latest_install_info["latestInstalledShortVersion"] || ""
pretty_date = tester.pretty_install_date || ""
- csv << [tester.first_name, tester.last_name, tester.email, group_names, tester.devices.count, install_version, pretty_date]
+ csv << [tester.first_name, tester.last_name, tester.email, group_names, install_version, pretty_date]
end
UI.success("Successfully exported CSV to #{file}")
end
end