fastlane 2.204.3 → 2.205.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +94 -94
  3. data/deliver/lib/deliver/runner.rb +2 -2
  4. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  5. data/fastlane/lib/fastlane/actions/badge.rb +1 -1
  6. data/fastlane/lib/fastlane/actions/get_version_number.rb +1 -1
  7. data/fastlane/lib/fastlane/actions/git_commit.rb +4 -6
  8. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +9 -0
  9. data/fastlane/lib/fastlane/commands_generator.rb +2 -1
  10. data/fastlane/lib/fastlane/version.rb +1 -1
  11. data/fastlane/swift/Deliverfile.swift +1 -1
  12. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  13. data/fastlane/swift/Fastlane.swift +4 -4
  14. data/fastlane/swift/Gymfile.swift +1 -1
  15. data/fastlane/swift/GymfileProtocol.swift +1 -1
  16. data/fastlane/swift/Matchfile.swift +1 -1
  17. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  18. data/fastlane/swift/Precheckfile.swift +1 -1
  19. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  20. data/fastlane/swift/Scanfile.swift +1 -1
  21. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  22. data/fastlane/swift/Screengrabfile.swift +1 -1
  23. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  24. data/fastlane/swift/Snapshotfile.swift +1 -1
  25. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  26. data/fastlane/swift/SocketClient.swift +2 -2
  27. data/fastlane/swift/formatting/Brewfile.lock.json +14 -14
  28. data/fastlane_core/README.md +1 -0
  29. data/frameit/lib/frameit/device_types.rb +7 -0
  30. data/match/lib/match/encryption/openssl.rb +1 -1
  31. data/match/lib/match/runner.rb +8 -3
  32. data/pilot/lib/pilot/build_manager.rb +2 -2
  33. data/spaceship/lib/spaceship/client.rb +13 -25
  34. data/spaceship/lib/spaceship/connect_api/.response.rb.swp +0 -0
  35. data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
  36. data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
  37. data/spaceship/lib/spaceship/connect_api/models/.review_submission.rb.swp +0 -0
  38. data/spaceship/lib/spaceship/connect_api/models/app.rb +2 -1
  39. data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +1 -0
  40. data/spaceship/lib/spaceship/tunes/app_ratings.rb +6 -6
  41. data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
  42. data/spaceship/lib/spaceship/tunes/tunes.rb +0 -1
  43. data/spaceship/lib/spaceship/tunes/tunes_client.rb +16 -19
  44. data/supply/lib/supply/client.rb +2 -7
  45. data/trainer/lib/assets/junit.xml.erb +6 -1
  46. data/trainer/lib/trainer/junit_generator.rb +1 -1
  47. data/trainer/lib/trainer/options.rb +1 -1
  48. data/trainer/lib/trainer/test_parser.rb +14 -1
  49. metadata +26 -24
  50. data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -15
  51. data/trainer/lib/trainer/.test_parser.rb.swp +0 -0
@@ -47,6 +47,9 @@ module Frameit
47
47
  PURPLE ||= "Purple"
48
48
  GRAPHITE ||= "Graphite"
49
49
  PACIFIC_BLUE ||= "Pacific Blue"
50
+ MIDNIGHT ||= "Midnight"
51
+ STARLIGHT ||= "Starlight"
52
+ SIERRA ||= "Sierra"
50
53
 
51
54
  def self.all_colors
52
55
  Color.constants.map { |c| Color.const_get(c).upcase.gsub(' ', '_') }
@@ -124,6 +127,10 @@ module Frameit
124
127
  IPHONE_12_PRO ||= Frameit::Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
125
128
  IPHONE_12_PRO_MAX ||= Frameit::Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
126
129
  IPHONE_12_MINI ||= Frameit::Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
130
+ IPHONE_13 ||= Frameit::Device.new("iphone-13", "Apple iPhone 13", 11, [[1170, 2532], [2532, 1170]], 460, Color::MIDNIGHT, Platform::IOS)
131
+ IPHONE_13_PRO ||= Frameit::Device.new("iphone-13-pro", "Apple iPhone 13 Pro", 11, [[1170, 2532], [2532, 1170]], 460, Color::GRAPHITE, Platform::IOS)
132
+ IPHONE_13_PRO_MAX ||= Frameit::Device.new("iphone13-pro-max", "Apple iPhone 13 Pro Max", 11, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
133
+ IPHONE_13_MINI ||= Frameit::Device.new("iphone-13-mini", "Apple iPhone 13 Mini", 11, [[1080, 2340], [2340, 1080]], 476, Color::MIDNIGHT, Platform::IOS)
127
134
  IPAD_10_2 ||= Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
128
135
  IPAD_AIR_2 ||= Frameit::Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD)
129
136
  IPAD_AIR_2019 ||= Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
@@ -135,7 +135,7 @@ module Match
135
135
  UI.crash!("Error encrypting '#{path}'")
136
136
  end
137
137
 
138
- # The encryption parameters in this implementations reflect the old behaviour which depended on the users' local OpenSSL version
138
+ # The encryption parameters in this implementations reflect the old behavior which depended on the users' local OpenSSL version
139
139
  # 1.0.x OpenSSL and earlier versions use MD5, 1.1.0c and newer uses SHA256, we try both before giving an error
140
140
  def decrypt_specific_file(path: nil, password: nil, hash_algorithm: "MD5")
141
141
  stored_data = Base64.decode64(File.read(path))
@@ -82,9 +82,9 @@ module Match
82
82
  app_identifiers = params[:app_identifier].to_s.split(/\s*,\s*/).uniq
83
83
  end
84
84
 
85
- # sometimes we get an array with arrays, this is a bug. To unblock people using match, I suggest we flatten!
85
+ # sometimes we get an array with arrays, this is a bug. To unblock people using match, I suggest we flatten
86
86
  # then in the future address the root cause of https://github.com/fastlane/fastlane/issues/11324
87
- app_identifiers.flatten!
87
+ app_identifiers = app_identifiers.flatten
88
88
 
89
89
  # Verify the App ID (as we don't want 'match' to fail at a later point)
90
90
  if spaceship
@@ -419,7 +419,12 @@ module Match
419
419
 
420
420
  return false unless portal_profile
421
421
 
422
- profile_certs_count = portal_profile.fetch_all_certificates.count
422
+ # When a certificate expires (not revoked) provisioning profile stays valid.
423
+ # And if we regenerate certificate count will not differ:
424
+ # * For portal certificates, we filter out the expired one but includes a new certificate;
425
+ # * Profile still contains an expired certificate and is valid.
426
+ # Thus, we need to check the validity of profile certificates too.
427
+ profile_certs_count = portal_profile.fetch_all_certificates.select(&:valid?).count
423
428
 
424
429
  certificate_types =
425
430
  case platform
@@ -402,8 +402,8 @@ module Pilot
402
402
  return generic_transporter unless tunes_client.teams.count > 1
403
403
 
404
404
  begin
405
- team = tunes_client.teams.find { |t| t['contentProvider']['contentProviderId'].to_s == tunes_client.team_id }
406
- name = team['contentProvider']['name']
405
+ team = tunes_client.teams.find { |t| t['providerId'].to_s == tunes_client.team_id }
406
+ name = team['name']
407
407
  provider_id = generic_transporter.provider_ids[name]
408
408
  UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
409
409
  return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id)
@@ -70,10 +70,10 @@ module Spaceship
70
70
 
71
71
  # @return (Array) A list of all available teams
72
72
  def teams
73
- user_details_data['associatedAccounts'].sort_by do |team|
73
+ user_details_data['availableProviders'].sort_by do |team|
74
74
  [
75
- team['contentProvider']['name'],
76
- team['contentProvider']['contentProviderId']
75
+ team['name'],
76
+ team['providerId']
77
77
  ]
78
78
  end
79
79
  end
@@ -124,8 +124,8 @@ module Spaceship
124
124
  # "userName"=>"detlef@krausefx.com"}
125
125
  def user_details_data
126
126
  return @_cached_user_details if @_cached_user_details
127
- r = request(:get, '/WebObjects/iTunesConnect.woa/ra/user/detail')
128
- @_cached_user_details = parse_response(r, 'data')
127
+ r = request(:get, "https://appstoreconnect.apple.com/olympus/v1/session")
128
+ @_cached_user_details = parse_response(r)
129
129
  end
130
130
 
131
131
  # @return (String) The currently selected Team ID
@@ -135,7 +135,7 @@ module Spaceship
135
135
  if teams.count > 1
136
136
  puts("The current user is in #{teams.count} teams. Pass a team ID or call `select_team` to choose a team. Using the first one for now.")
137
137
  end
138
- @current_team_id ||= user_details_data['sessionToken']['contentProviderId']
138
+ @current_team_id ||= user_details_data['provider']['providerId']
139
139
  end
140
140
 
141
141
  # Set a new team ID which will be used from now on
@@ -144,12 +144,11 @@ module Spaceship
144
144
  # following confusing error message
145
145
  #
146
146
  # invalid content provider id
147
- #
148
147
  available_teams = teams.collect do |team|
149
148
  {
150
- team_id: (team["contentProvider"] || {})["contentProviderId"],
151
- public_team_id: (team["contentProvider"] || {})["contentProviderPublicId"],
152
- team_name: (team["contentProvider"] || {})["name"]
149
+ team_id: team["providerId"],
150
+ public_team_id: team["publicProviderId"],
151
+ team_name: team["name"]
153
152
  }
154
153
  end
155
154
 
@@ -163,21 +162,10 @@ module Spaceship
163
162
  end
164
163
 
165
164
  response = request(:post) do |req|
166
- req.url("https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests")
167
- req.body = {
168
- "data": {
169
- "type": "providerSwitchRequests",
170
- "relationships": {
171
- "provider": {
172
- "data": {
173
- "type": "providers",
174
- "id": result[:public_team_id]
175
- }
176
- }
177
- }
178
- }
179
- }.to_json
165
+ req.url("https://appstoreconnect.apple.com/olympus/v1/session")
166
+ req.body = { "provider": { "providerId": result[:team_id] } }.to_json
180
167
  req.headers['Content-Type'] = 'application/json'
168
+ req.headers['X-Requested-With'] = 'olympus-ui'
181
169
  end
182
170
 
183
171
  handle_itc_response(response.body)
@@ -546,7 +534,7 @@ module Spaceship
546
534
  raise AppleIDAndPrivacyAcknowledgementNeeded.new, "Need to acknowledge to Apple's Apple ID and Privacy statement. " \
547
535
  "Please manually log into https://appleid.apple.com (or https://appstoreconnect.apple.com) to acknowledge the statement. " \
548
536
  "Your account might also be asked to upgrade to 2FA. " \
549
- "Set SPACESHIP_SKIP_2FA_UPGRADE=1 for fastlane to automaticaly bypass 2FA upgrade if possible."
537
+ "Set SPACESHIP_SKIP_2FA_UPGRADE=1 for fastlane to automatically bypass 2FA upgrade if possible."
550
538
  elsif (response['Set-Cookie'] || "").include?("itctx")
551
539
  raise "Looks like your Apple ID is not enabled for App Store Connect, make sure to be able to login online"
552
540
  else
@@ -157,8 +157,6 @@ module Spaceship
157
157
  end
158
158
 
159
159
  def with_asc_retry(tries = 5, &_block)
160
- tries = 1 if Object.const_defined?("SpecHelper")
161
-
162
160
  response = yield
163
161
 
164
162
  status = response.status if response
@@ -170,9 +168,16 @@ module Spaceship
170
168
 
171
169
  return response
172
170
  rescue UnauthorizedAccessError => error
173
- # Catch unathorized access and re-raising
174
- # There is no need to try again
175
- raise error
171
+ tries -= 1
172
+ puts(error) if Spaceship::Globals.verbose?
173
+ if tries.zero?
174
+ raise error
175
+ else
176
+ msg = "Token has expired or has been revoked! Trying to refresh..."
177
+ puts(msg) if Spaceship::Globals.verbose?
178
+ @token.refresh!
179
+ retry
180
+ end
176
181
  rescue TimeoutRetryError => error
177
182
  tries -= 1
178
183
  puts(error) if Spaceship::Globals.verbose?
@@ -436,7 +436,8 @@ module Spaceship
436
436
  filter = {
437
437
  state: [
438
438
  Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::WAITING_FOR_REVIEW,
439
- Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::IN_REVIEW
439
+ Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::IN_REVIEW,
440
+ Spaceship::ConnectAPI::ReviewSubmission::ReviewSubmissionState::UNRESOLVED_ISSUES
440
441
  ].join(","),
441
442
  platform: platform
442
443
  }
@@ -20,6 +20,7 @@ module Spaceship
20
20
  COMPLETE = "COMPLETE"
21
21
  IN_REVIEW = "IN_REVIEW"
22
22
  READY_FOR_REVIEW = "READY_FOR_REVIEW"
23
+ UNRESOLVED_ISSUES = "UNRESOLVED_ISSUES"
23
24
  WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
24
25
  end
25
26
 
@@ -8,22 +8,22 @@ module Spaceship
8
8
  # this version is for
9
9
  attr_accessor :application
10
10
 
11
- # @return (Integer) total number of ratings recevied
11
+ # @return (Integer) total number of ratings received
12
12
  attr_accessor :rating_count
13
13
 
14
- # @return (Integer) total number of one star ratings recevied
14
+ # @return (Integer) total number of one star ratings received
15
15
  attr_accessor :one_star_rating_count
16
16
 
17
- # @return (Integer) total number of two star ratings recevied
17
+ # @return (Integer) total number of two star ratings received
18
18
  attr_accessor :two_star_rating_count
19
19
 
20
- # @return (Integer) total number of three star ratings recevied
20
+ # @return (Integer) total number of three star ratings received
21
21
  attr_accessor :three_star_rating_count
22
22
 
23
- # @return (Integer) total number of four star ratings recevied
23
+ # @return (Integer) total number of four star ratings received
24
24
  attr_accessor :four_star_rating_count
25
25
 
26
- # @return (Integer) total number of five star ratings recevied
26
+ # @return (Integer) total number of five star ratings received
27
27
  attr_accessor :five_star_rating_count
28
28
 
29
29
  attr_mapping({
@@ -7,7 +7,7 @@ module Spaceship
7
7
  attr_accessor :application
8
8
 
9
9
  # Create a new Purchase Family
10
- # a freshly created family has to have atleast one product.
10
+ # a freshly created family has to have at least one product.
11
11
  # the product will be created, and versions/pricing_intervals and so on
12
12
  # should be set by subsequent edit.
13
13
  # @param name (String) Familyname
@@ -14,7 +14,6 @@ require_relative 'app_version_ref'
14
14
  require_relative 'app_version_history'
15
15
  require_relative 'app_version_states_history'
16
16
  require_relative 'transit_app_file'
17
- require_relative 'user_detail'
18
17
  require_relative 'app_screenshot'
19
18
  require_relative 'language_converter'
20
19
  require_relative 'build'
@@ -9,7 +9,6 @@ require_relative 'errors'
9
9
  require_relative 'iap_subscription_pricing_tier'
10
10
  require_relative 'pricing_tier'
11
11
  require_relative 'territory'
12
- require_relative 'user_detail'
13
12
  module Spaceship
14
13
  # rubocop:disable Metrics/ClassLength
15
14
  class TunesClient < Spaceship::Client
@@ -72,13 +71,13 @@ module Spaceship
72
71
  puts("Looking for App Store Connect Team with name #{t_name}") if Spaceship::Globals.verbose?
73
72
 
74
73
  teams.each do |t|
75
- t_id = t['contentProvider']['contentProviderId'].to_s if t['contentProvider']['name'].casecmp(t_name).zero?
74
+ t_id = t['providerId'].to_s if t['name'].casecmp(t_name).zero?
76
75
  end
77
76
 
78
77
  puts("Could not find team with name '#{t_name}', trying to fallback to default team") if t_id.length.zero?
79
78
  end
80
79
 
81
- t_id = teams.first['contentProvider']['contentProviderId'].to_s if teams.count == 1
80
+ t_id = teams.first['providerId'].to_s if teams.count == 1
82
81
 
83
82
  if t_id.length > 0
84
83
  puts("Looking for App Store Connect Team with ID #{t_id}") if Spaceship::Globals.verbose?
@@ -92,11 +91,11 @@ module Spaceship
92
91
  loop do
93
92
  puts("Multiple #{'App Store Connect teams'.yellow} found, please enter the number of the team you want to use: ")
94
93
  if ENV["FASTLANE_HIDE_TEAM_INFORMATION"].to_s.length == 0
94
+ first_team = teams.first
95
95
  puts("Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:")
96
96
  puts("Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable")
97
- first_team = teams.first["contentProvider"]
98
97
  puts("")
99
- puts(" itc_team_id \"#{first_team['contentProviderId']}\"")
98
+ puts(" itc_team_id \"#{first_team['providerId']}\"")
100
99
  puts("")
101
100
  puts("or")
102
101
  puts("")
@@ -106,7 +105,7 @@ module Spaceship
106
105
 
107
106
  # We're not using highline here, as spaceship doesn't have a dependency to fastlane_core or highline
108
107
  teams.each_with_index do |team, i|
109
- puts("#{i + 1}) \"#{team['contentProvider']['name']}\" (#{team['contentProvider']['contentProviderId']})")
108
+ puts("#{i + 1}) \"#{team['name']}\" (#{team['providerId']})")
110
109
  end
111
110
 
112
111
  unless Spaceship::Client::UserInterface.interactive?
@@ -119,7 +118,7 @@ module Spaceship
119
118
  team_to_use = teams[selected] if selected >= 0
120
119
 
121
120
  if team_to_use
122
- self.team_id = team_to_use['contentProvider']['contentProviderId'].to_s # actually set the team id here
121
+ self.team_id = team_to_use['providerId'].to_s # actually set the team id here
123
122
  return self.team_id
124
123
  end
125
124
  end
@@ -950,13 +949,6 @@ module Spaceship
950
949
  Spaceship::Tunes::AppVersionRef.factory(data)
951
950
  end
952
951
 
953
- # Fetches the User Detail information from ITC. This gets called often and almost never changes
954
- # so we cache it
955
- # @return [UserDetail] the response
956
- def user_detail_data
957
- @_cached_user_detail_data ||= Spaceship::Tunes::UserDetail.factory(user_details_data, self)
958
- end
959
-
960
952
  #####################################################
961
953
  # @!group CandiateBuilds
962
954
  #####################################################
@@ -992,7 +984,7 @@ module Spaceship
992
984
  tries -= 1
993
985
  if tries > 0
994
986
  logger.warn("Received temporary server error from App Store Connect. Retrying the request...")
995
- sleep(3) unless Object.const_defined?("SpecHelper")
987
+ sleep(3) unless Object.const_defined?(:SpecHelper)
996
988
  retry
997
989
  end
998
990
  end
@@ -1560,7 +1552,7 @@ module Spaceship
1560
1552
  msg = "App Store Connect temporary error received: '#{ex.message}'. Retrying after #{seconds_to_sleep} seconds (remaining: #{tries})..."
1561
1553
  puts(msg)
1562
1554
  logger.warn(msg)
1563
- sleep(seconds_to_sleep) unless Object.const_defined?("SpecHelper")
1555
+ sleep(seconds_to_sleep) unless Object.const_defined?(:SpecHelper)
1564
1556
  retry
1565
1557
  end
1566
1558
  raise ex # re-raise the exception
@@ -1570,7 +1562,7 @@ module Spaceship
1570
1562
  msg = "Potential server error received: '#{ex.message}'. Retrying after 10 seconds (remaining: #{potential_server_error_tries})..."
1571
1563
  puts(msg)
1572
1564
  logger.warn(msg)
1573
- sleep(seconds_to_sleep) unless Object.const_defined?("SpecHelper")
1565
+ sleep(seconds_to_sleep) unless Object.const_defined?(:SpecHelper)
1574
1566
  retry
1575
1567
  end
1576
1568
  raise ex
@@ -1582,9 +1574,14 @@ module Spaceship
1582
1574
  @sso_token_for_video = nil
1583
1575
  end
1584
1576
 
1585
- # the contentProviderIr found in the UserDetail instance
1577
+ # the contentProviderId found in the user details data
1586
1578
  def content_provider_id
1587
- @content_provider_id ||= user_detail_data.content_provider_id
1579
+ return @content_provider_id if @content_provider_id
1580
+
1581
+ provider = user_details_data["provider"]["providerId"]
1582
+ @content_provider_id ||= provider.to_s if provider
1583
+
1584
+ return @content_provider_id
1588
1585
  end
1589
1586
 
1590
1587
  # the ssoTokenForImage found in the AppVersionRef instance
@@ -266,14 +266,9 @@ module Supply
266
266
  filtered_tracks = tracks.select { |t| !t.releases.nil? && t.releases.any? { |r| r.name == version } }
267
267
 
268
268
  if filtered_tracks.length > 1
269
- # Production track takes precedence if version is present in multiple tracks
269
+ # Prefer tracks in production, beta, alpha, internal order
270
270
  # E.g.: A release might've been promoted from Alpha/Beta track. This means the release will be present in two or more tracks
271
- if filtered_tracks.any? { |t| t.track == Supply::Tracks::DEFAULT }
272
- filtered_tracks = filtered_tracks.select { |t| t.track == Supply::Tracks::DEFAULT }
273
- else
274
- # E.g.: A release might be in both Alpha & Beta (not sure if this is possible, just catching if it ever happens), giving Beta precedence.
275
- filtered_tracks = filtered_tracks.select { |t| t.track == Supply::Tracks::BETA }
276
- end
271
+ filtered_tracks = filtered_tracks.sort_by { |t| Supply::Tracks::DEFAULTS.index(t.track) || Float::INFINITY }
277
272
  end
278
273
 
279
274
  filtered_track = filtered_tracks.first
@@ -7,6 +7,11 @@
7
7
  <testsuites tests="<%= number_of_tests %>" failures="<%= number_of_failures %>">
8
8
  <% @results.each do |testsuite| %>
9
9
  <testsuite name=<%= (testsuite[:target_name].nil? ? testsuite[:test_name] : testsuite[:target_name]).encode(:xml => :attr) %> tests="<%= testsuite[:number_of_tests_excluding_retries] %>" failures="<%= testsuite[:number_of_failures_excluding_retries] %>" <% if testsuite[:number_of_skipped] %>skipped="<%= testsuite[:number_of_skipped] %>" <% end %>time="<%= testsuite[:duration] %>">
10
+ <% unless testsuite[:configuration_name].nil? %>
11
+ <properties>
12
+ <property name="Configuration" value="<%= testsuite[:configuration_name] %>"/>
13
+ </properties>
14
+ <% end %>
10
15
  <% testsuite[:tests].each do |test| %>
11
16
  <testcase classname=<%= test[:test_group].encode(:xml => :attr) %> name=<%= test[:name].encode(:xml => :attr) %> time="<%= test[:duration] %>">
12
17
  <% (test[:failures] || []).each do |failure| %>
@@ -15,7 +20,7 @@
15
20
  <% end %>
16
21
  <% if test[:skipped] %>
17
22
  <skipped/>
18
- <% end%>
23
+ <% end %>
19
24
  </testcase>
20
25
  <% end %>
21
26
  </testsuite>
@@ -19,7 +19,7 @@ module Trainer
19
19
 
20
20
  xml = xml.gsub('system_', 'system-').delete("\e") # Jenkins can not parse 'ESC' symbol
21
21
 
22
- # We have to manuall clear empty lines
22
+ # We have to manually clear empty lines
23
23
  # They may contain white spaces
24
24
  clean_xml = []
25
25
  xml.each_line do |row|
@@ -32,7 +32,7 @@ module Trainer
32
32
  env_name: "TRAINER_OUTPUT_DIRECTORY",
33
33
  default_value: nil,
34
34
  optional: true,
35
- description: "Directoy in which the xml files should be written to. Same directory as source by default"),
35
+ description: "Directory in which the xml files should be written to. Same directory as source by default"),
36
36
  FastlaneCore::ConfigItem.new(key: :output_filename,
37
37
  short_option: "-f",
38
38
  env_name: "TRAINER_OUTPUT_FILENAME",
@@ -136,7 +136,7 @@ module Trainer
136
136
 
137
137
  # @return [Bool] were all tests successful? Is false if at least one test failed
138
138
  def tests_successful?
139
- self.data.collect { |a| a[:number_of_failures] }.all?(&:zero?)
139
+ self.data.collect { |a| a[:number_of_failures_excluding_retries] }.all?(&:zero?)
140
140
  end
141
141
 
142
142
  private
@@ -230,6 +230,8 @@ module Trainer
230
230
  all_summaries = summaries.map(&:summaries).flatten
231
231
  testable_summaries = all_summaries.map(&:testable_summaries).flatten
232
232
 
233
+ summaries_to_names = test_summaries_to_configuration_names(all_summaries)
234
+
233
235
  # Maps ActionTestableSummary to rows for junit generator
234
236
  rows = testable_summaries.map do |testable_summary|
235
237
  all_tests = testable_summary.all_tests.flatten
@@ -317,6 +319,7 @@ module Trainer
317
319
  project_path: testable_summary.project_relative_path,
318
320
  target_name: testable_summary.target_name,
319
321
  test_name: testable_summary.name,
322
+ configuration_name: summaries_to_names[testable_summary],
320
323
  duration: all_tests.map(&:duration).inject(:+),
321
324
  tests: test_rows
322
325
  }
@@ -337,6 +340,16 @@ module Trainer
337
340
  self.data = rows
338
341
  end
339
342
 
343
+ def test_summaries_to_configuration_names(test_summaries)
344
+ summary_to_name = {}
345
+ test_summaries.each do |summary|
346
+ summary.testable_summaries.each do |testable_summary|
347
+ summary_to_name[testable_summary] = summary.name
348
+ end
349
+ end
350
+ summary_to_name
351
+ end
352
+
340
353
  # Convert the Hashes and Arrays in something more useful
341
354
  def parse_content(xcpretty_naming)
342
355
  self.data = self.raw_json["TestableSummaries"].collect do |testable_summary|
metadata CHANGED
@@ -1,39 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.204.3
4
+ version: 2.205.2
5
5
  platform: ruby
6
6
  authors:
7
- - Jorge Revuelta H
8
- - Roger Oba
9
- - Danielle Tomlinson
10
- - Helmut Januschka
7
+ - Jan Piotrowski
8
+ - Matthew Ellis
9
+ - Satoshi Namai
10
+ - Daniel Jankowski
11
+ - Manu Wallner
11
12
  - Jérôme Lacoste
12
- - Josh Holtz
13
- - Joshua Liebowitz
14
- - Felix Krause
13
+ - Jimmy Dee
14
+ - Luka Mirosevic
15
15
  - Aaron Brager
16
- - Łukasz Grabowski
17
- - Fumiya Nakamura
16
+ - Olivier Halligon
18
17
  - Iulian Onofrei
19
- - Jimmy Dee
20
- - Manish Rathi
18
+ - Josh Holtz
19
+ - Fumiya Nakamura
20
+ - Jorge Revuelta H
21
+ - Danielle Tomlinson
21
22
  - Kohki Miki
22
- - Daniel Jankowski
23
- - Maksym Grebenets
24
- - Stefan Natchev
25
- - Satoshi Namai
26
23
  - Max Ott
27
- - Matthew Ellis
28
- - Luka Mirosevic
29
- - Jan Piotrowski
30
- - Olivier Halligon
31
- - Manu Wallner
24
+ - Joshua Liebowitz
25
+ - Manish Rathi
26
+ - Łukasz Grabowski
27
+ - Felix Krause
32
28
  - Andrew McBurney
29
+ - Roger Oba
30
+ - Helmut Januschka
31
+ - Maksym Grebenets
32
+ - Stefan Natchev
33
33
  autorequire:
34
34
  bindir: bin
35
35
  cert_chain: []
36
- date: 2022-02-11 00:00:00.000000000 Z
36
+ date: 2022-04-21 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: xcodeproj
@@ -1017,6 +1017,7 @@ files:
1017
1017
  - fastlane/lib/fastlane/action.rb
1018
1018
  - fastlane/lib/fastlane/action_collector.rb
1019
1019
  - fastlane/lib/fastlane/actions/.DS_Store
1020
+ - fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp
1020
1021
  - fastlane/lib/fastlane/actions/README.md
1021
1022
  - fastlane/lib/fastlane/actions/actions_helper.rb
1022
1023
  - fastlane/lib/fastlane/actions/adb.rb
@@ -1657,10 +1658,13 @@ files:
1657
1658
  - spaceship/lib/spaceship/client.rb
1658
1659
  - spaceship/lib/spaceship/commands_generator.rb
1659
1660
  - spaceship/lib/spaceship/connect_api.rb
1661
+ - spaceship/lib/spaceship/connect_api/.response.rb.swp
1660
1662
  - spaceship/lib/spaceship/connect_api/api_client.rb
1661
1663
  - spaceship/lib/spaceship/connect_api/client.rb
1662
1664
  - spaceship/lib/spaceship/connect_api/file_uploader.rb
1663
1665
  - spaceship/lib/spaceship/connect_api/model.rb
1666
+ - spaceship/lib/spaceship/connect_api/models/.app.rb.swp
1667
+ - spaceship/lib/spaceship/connect_api/models/.review_submission.rb.swp
1664
1668
  - spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb
1665
1669
  - spaceship/lib/spaceship/connect_api/models/app.rb
1666
1670
  - spaceship/lib/spaceship/connect_api/models/app_category.rb
@@ -1828,7 +1832,6 @@ files:
1828
1832
  - spaceship/lib/spaceship/tunes/tunes.rb
1829
1833
  - spaceship/lib/spaceship/tunes/tunes_base.rb
1830
1834
  - spaceship/lib/spaceship/tunes/tunes_client.rb
1831
- - spaceship/lib/spaceship/tunes/user_detail.rb
1832
1835
  - spaceship/lib/spaceship/tunes/version_set.rb
1833
1836
  - spaceship/lib/spaceship/two_step_or_factor_client.rb
1834
1837
  - spaceship/lib/spaceship/ui.rb
@@ -1848,7 +1851,6 @@ files:
1848
1851
  - trainer/lib/.DS_Store
1849
1852
  - trainer/lib/assets/junit.xml.erb
1850
1853
  - trainer/lib/trainer.rb
1851
- - trainer/lib/trainer/.test_parser.rb.swp
1852
1854
  - trainer/lib/trainer/commands_generator.rb
1853
1855
  - trainer/lib/trainer/junit_generator.rb
1854
1856
  - trainer/lib/trainer/module.rb
@@ -1,15 +0,0 @@
1
- require_relative 'tunes_base'
2
-
3
- module Spaceship
4
- module Tunes
5
- class UserDetail < TunesBase
6
- attr_accessor :content_provider_id
7
- attr_accessor :ds_id # used for the team selection (https://github.com/fastlane/fastlane/issues/6711)
8
-
9
- attr_mapping(
10
- 'contentProviderId' => :content_provider_id,
11
- 'sessionToken.dsId' => :ds_id
12
- )
13
- end
14
- end
15
- end