fastlane 2.238.0 → 2.241.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -177
  3. data/bin/fastlane +4 -2
  4. data/credentials_manager/README.md +1 -1
  5. data/credentials_manager/lib/credentials_manager/account_manager.rb +6 -2
  6. data/deliver/lib/deliver/app_screenshot.rb +0 -4
  7. data/deliver/lib/deliver/commands_generator.rb +1 -1
  8. data/deliver/lib/deliver/detect_values.rb +3 -1
  9. data/deliver/lib/deliver/download_screenshots.rb +8 -1
  10. data/deliver/lib/deliver/html_generator.rb +1 -1
  11. data/deliver/lib/deliver/options.rb +8 -0
  12. data/deliver/lib/deliver/runner.rb +5 -4
  13. data/deliver/lib/deliver/sync_screenshots.rb +27 -28
  14. data/deliver/lib/deliver/upload_app_clip_default_experience_header_images.rb +3 -3
  15. data/deliver/lib/deliver/upload_metadata.rb +34 -16
  16. data/deliver/lib/deliver/upload_screenshots.rb +24 -18
  17. data/docs/README.md +25 -0
  18. data/fastlane/lib/assets/TeamTable.md.erb +28 -0
  19. data/fastlane/lib/fastlane/actions/appaloosa.rb +2 -1
  20. data/fastlane/lib/fastlane/actions/appium.rb +1 -1
  21. data/fastlane/lib/fastlane/actions/apteligent.rb +8 -1
  22. data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +3 -1
  23. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +7 -2
  24. data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +3 -0
  25. data/fastlane/lib/fastlane/actions/danger.rb +5 -5
  26. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -2
  27. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -2
  28. data/fastlane/lib/fastlane/actions/docs/get_certificates.md +0 -2
  29. data/fastlane/lib/fastlane/actions/docs/get_push_certificate.md +7 -3
  30. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +13 -3
  31. data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +2 -2
  32. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
  33. data/fastlane/lib/fastlane/actions/github_api.rb +1 -2
  34. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
  35. data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -1
  36. data/fastlane/lib/fastlane/actions/increment_version_number.rb +1 -1
  37. data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +16 -6
  38. data/fastlane/lib/fastlane/actions/lcov.rb +11 -2
  39. data/fastlane/lib/fastlane/actions/nexus_upload.rb +16 -4
  40. data/fastlane/lib/fastlane/actions/notification.rb +3 -2
  41. data/fastlane/lib/fastlane/actions/oclint.rb +8 -8
  42. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -4
  43. data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
  44. data/fastlane/lib/fastlane/actions/say.rb +2 -4
  45. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
  46. data/fastlane/lib/fastlane/actions/sonar.rb +16 -16
  47. data/fastlane/lib/fastlane/actions/sourcedocs.rb +8 -8
  48. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +4 -2
  49. data/fastlane/lib/fastlane/actions/splunkmint.rb +8 -1
  50. data/fastlane/lib/fastlane/actions/swiftlint.rb +6 -3
  51. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +4 -2
  52. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -2
  53. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -2
  54. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -4
  55. data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +3 -1
  56. data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +20 -19
  57. data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -6
  58. data/fastlane/lib/fastlane/actions/zip.rb +2 -1
  59. data/fastlane/lib/fastlane/auto_complete.rb +1 -1
  60. data/fastlane/lib/fastlane/cli_tools_distributor.rb +14 -0
  61. data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +23 -0
  62. data/fastlane/lib/fastlane/environment_printer.rb +12 -25
  63. data/fastlane/lib/fastlane/fast_file.rb +2 -1
  64. data/fastlane/lib/fastlane/fastlane_require.rb +5 -1
  65. data/fastlane/lib/fastlane/helper/git_helper.rb +4 -2
  66. data/fastlane/lib/fastlane/helper/sh_helper.rb +25 -7
  67. data/fastlane/lib/fastlane/new_action.rb +1 -1
  68. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -1
  69. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -1
  70. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +36 -4
  71. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
  72. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
  73. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +7 -7
  74. data/fastlane/lib/fastlane/swift_lane_manager.rb +22 -4
  75. data/fastlane/lib/fastlane/version.rb +3 -2
  76. data/fastlane/swift/Deliverfile.swift +1 -1
  77. data/fastlane/swift/DeliverfileProtocol.swift +8 -1
  78. data/fastlane/swift/Fastlane.swift +129 -11
  79. data/fastlane/swift/Gymfile.swift +1 -1
  80. data/fastlane/swift/GymfileProtocol.swift +8 -1
  81. data/fastlane/swift/MainProcess.swift +190 -20
  82. data/fastlane/swift/Matchfile.swift +1 -1
  83. data/fastlane/swift/MatchfileProtocol.swift +10 -3
  84. data/fastlane/swift/Precheckfile.swift +1 -1
  85. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  86. data/fastlane/swift/Scanfile.swift +1 -1
  87. data/fastlane/swift/ScanfileProtocol.swift +15 -1
  88. data/fastlane/swift/Screengrabfile.swift +1 -1
  89. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  90. data/fastlane/swift/Snapshotfile.swift +1 -1
  91. data/fastlane/swift/SnapshotfileProtocol.swift +8 -1
  92. data/fastlane/swift/formatting/Rakefile +1 -0
  93. data/fastlane/swift/main.swift +4 -1
  94. data/fastlane_core/README.md +1 -1
  95. data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +1 -17
  96. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +23 -8
  97. data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -2
  98. data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +20 -7
  99. data/fastlane_core/lib/fastlane_core/helper.rb +34 -5
  100. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -1
  101. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +16 -27
  102. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +31 -28
  103. data/fastlane_core/lib/fastlane_core/languages.rb +0 -1
  104. data/fastlane_core/lib/fastlane_core/print_table.rb +5 -2
  105. data/fastlane_core/lib/fastlane_core/project.rb +19 -0
  106. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +10 -19
  107. data/fastlane_core/lib/fastlane_core/secrets.rb +77 -0
  108. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +3 -3
  109. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +1 -1
  110. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +2 -1
  111. data/fastlane_core/lib/fastlane_core.rb +1 -0
  112. data/frameit/lib/frameit/device.rb +1 -1
  113. data/frameit/lib/frameit/frame_downloader.rb +2 -0
  114. data/frameit/lib/frameit/runner.rb +3 -2
  115. data/frameit/lib/frameit/screenshot.rb +0 -1
  116. data/gym/lib/gym/generators/build_command_generator.rb +4 -4
  117. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +3 -3
  118. data/gym/lib/gym/options.rb +5 -0
  119. data/gym/lib/gym/runner.rb +1 -1
  120. data/internal/README.md +1 -1
  121. data/match/lib/match/encryption/openssl.rb +6 -2
  122. data/match/lib/match/generator.rb +1 -0
  123. data/match/lib/match/nuke.rb +2 -2
  124. data/match/lib/match/options.rb +13 -5
  125. data/match/lib/match/runner.rb +30 -3
  126. data/match/lib/match/storage/git_storage.rb +44 -11
  127. data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
  128. data/match/lib/match/storage/google_cloud_storage.rb +6 -1
  129. data/match/lib/match/storage/interface.rb +8 -5
  130. data/pem/lib/pem/manager.rb +5 -1
  131. data/pem/lib/pem/module.rb +0 -4
  132. data/pem/lib/pem/options.rb +6 -0
  133. data/pilot/lib/pilot/build_manager.rb +32 -0
  134. data/pilot/lib/pilot/options.rb +8 -0
  135. data/precheck/lib/precheck/rule_processor.rb +1 -0
  136. data/produce/lib/produce/developer_center.rb +49 -2
  137. data/produce/lib/produce/itunes_connect.rb +1 -1
  138. data/produce/lib/produce/module.rb +21 -0
  139. data/produce/lib/produce/options.rb +17 -0
  140. data/produce/lib/produce/service.rb +3 -5
  141. data/produce/lib/produce.rb +0 -1
  142. data/scan/lib/scan/options.rb +12 -0
  143. data/scan/lib/scan/runner.rb +1 -1
  144. data/scan/lib/scan/test_command_generator.rb +12 -9
  145. data/scan/lib/scan/test_result_parser.rb +1 -0
  146. data/scan/lib/scan/xcpretty_reporter_options_generator.rb +2 -2
  147. data/screengrab/lib/screengrab/page.html.erb +12 -7
  148. data/screengrab/lib/screengrab/reports_generator.rb +1 -1
  149. data/sigh/lib/assets/resign.sh +38 -9
  150. data/sigh/lib/sigh/local_manage.rb +1 -1
  151. data/sigh/lib/sigh/options.rb +5 -0
  152. data/sigh/lib/sigh/resign.rb +3 -3
  153. data/sigh/lib/sigh/runner.rb +6 -1
  154. data/snapshot/lib/snapshot/options.rb +5 -0
  155. data/snapshot/lib/snapshot/page.html.erb +17 -12
  156. data/snapshot/lib/snapshot/reports_generator.rb +1 -1
  157. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
  158. data/snapshot/lib/snapshot.rb +0 -2
  159. data/spaceship/README.md +2 -3
  160. data/spaceship/lib/spaceship/base.rb +3 -1
  161. data/spaceship/lib/spaceship/client.rb +159 -19
  162. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +16 -0
  163. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +13 -2
  164. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -0
  165. data/spaceship/lib/spaceship/connect_api/models/profile.rb +7 -5
  166. data/spaceship/lib/spaceship/connect_api/models/routing_app_coverage.rb +75 -0
  167. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +25 -0
  168. data/spaceship/lib/spaceship/connect_api/token.rb +6 -1
  169. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +45 -0
  170. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  171. data/spaceship/lib/spaceship/du/upload_file.rb +4 -3
  172. data/spaceship/lib/spaceship/errors.rb +7 -1
  173. data/spaceship/lib/spaceship/globals.rb +2 -2
  174. data/spaceship/lib/spaceship/portal/merchant.rb +127 -2
  175. data/spaceship/lib/spaceship/portal/portal_client.rb +58 -0
  176. data/spaceship/lib/spaceship/portal/ui/select_team.rb +0 -2
  177. data/spaceship/lib/spaceship/portal/website_push.rb +8 -2
  178. data/spaceship/lib/spaceship/test_flight/client.rb +0 -22
  179. data/spaceship/lib/spaceship/test_flight.rb +0 -1
  180. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -0
  181. data/supply/lib/supply/client.rb +6 -0
  182. data/supply/lib/supply/options.rb +1 -0
  183. data/supply/lib/supply/reader.rb +15 -0
  184. data/supply/lib/supply.rb +0 -1
  185. data/trainer/lib/trainer/xcresult/helper.rb +27 -13
  186. metadata +80 -64
  187. data/produce/lib/produce/available_default_languages.rb +0 -62
  188. data/snapshot/lib/snapshot/screenshot_flatten.rb +0 -20
  189. data/snapshot/lib/snapshot/screenshot_rotate.rb +0 -36
  190. data/spaceship/lib/spaceship/test_flight/app_test_info.rb +0 -40
  191. data/supply/lib/supply/apk_listing.rb +0 -14
  192. /data/fastlane/lib/assets/{custom_action_template.rb → custom_action_template.rb.template} +0 -0
@@ -27,7 +27,11 @@ module Fastlane
27
27
  UI.important("Installing Ruby gem '#{gem_name}'...")
28
28
 
29
29
  spec_name = self.find_gem_name(gem_name)
30
- UI.important("Found gem \"#{spec_name}\" instead of the required name \"#{gem_name}\"") if spec_name != gem_name
30
+ if spec_name != gem_name
31
+ message = "Could not find gem '#{gem_name}' on RubyGems"
32
+ message += ". Did you mean '#{spec_name}'? Fix the name in your Fastfile" if spec_name
33
+ UI.user_error!(message)
34
+ end
31
35
 
32
36
  return if Helper.test?
33
37
 
@@ -9,9 +9,10 @@ module Fastlane
9
9
  end.freeze
10
10
  end
11
11
 
12
- def self.git_log_between(pretty_format, from, to, merge_commit_filtering, date_format = nil, ancestry_path, app_path)
12
+ def self.git_log_between(pretty_format, from, to, matching_pattern, merge_commit_filtering, date_format = nil, ancestry_path, app_path)
13
13
  command = %w(git log)
14
14
  command << "--pretty=#{pretty_format}"
15
+ command << "--grep=#{matching_pattern}" if matching_pattern
15
16
  command << "--date=#{date_format}" if date_format
16
17
  command << '--ancestry-path' if ancestry_path
17
18
  command << "#{from}...#{to}"
@@ -24,9 +25,10 @@ module Fastlane
24
25
  nil
25
26
  end
26
27
 
27
- def self.git_log_last_commits(pretty_format, commit_count, merge_commit_filtering, date_format = nil, ancestry_path, app_path)
28
+ def self.git_log_last_commits(pretty_format, commit_count, matching_pattern, merge_commit_filtering, date_format = nil, ancestry_path, app_path)
28
29
  command = %w(git log)
29
30
  command << "--pretty=#{pretty_format}"
31
+ command << "--grep=#{matching_pattern}" if matching_pattern
30
32
  command << "--date=#{date_format}" if date_format
31
33
  command << '--ancestry-path' if ancestry_path
32
34
  command << '-n' << commit_count.to_s
@@ -8,12 +8,13 @@ module Fastlane
8
8
  # When running this in tests, it will return the actual command instead of executing it
9
9
  # @param log [Boolean] should fastlane print out the executed command
10
10
  # @param error_callback [Block] a callback invoked with the command output if there is a non-zero exit status
11
- def self.sh(*command, log: true, error_callback: nil, &b)
12
- sh_control_output(*command, print_command: log, print_command_output: log, error_callback: error_callback, &b)
11
+ # @param stdin [String] data written to the command's standard input, which is then closed; it is never printed
12
+ def self.sh(*command, log: true, error_callback: nil, stdin: nil, &b)
13
+ sh_control_output(*command, print_command: log, print_command_output: log, error_callback: error_callback, stdin: stdin, &b)
13
14
  end
14
15
 
15
- def self.sh_no_action(*command, log: true, error_callback: nil, &b)
16
- sh_control_output(*command, print_command: log, print_command_output: log, error_callback: error_callback, &b)
16
+ def self.sh_no_action(*command, log: true, error_callback: nil, stdin: nil, &b)
17
+ sh_control_output(*command, print_command: log, print_command_output: log, error_callback: error_callback, stdin: stdin, &b)
17
18
  end
18
19
 
19
20
  # @param command The command to be executed (variadic)
@@ -25,7 +26,7 @@ module Fastlane
25
26
  # @yieldparam [String] result The complete output to stdout and stderr of the completed command
26
27
  # @yieldparam [String] cmd A shell command equivalent to the arguments passed
27
28
  # rubocop: disable Metrics/PerceivedComplexity
28
- def self.sh_control_output(*command, print_command: true, print_command_output: true, error_callback: nil)
29
+ def self.sh_control_output(*command, print_command: true, print_command_output: true, error_callback: nil, stdin: nil)
29
30
  print_command = print_command_output = true if $troubleshoot
30
31
  # Set the encoding first, the user might have set it wrong
31
32
  previous_encoding = [Encoding.default_external, Encoding.default_internal]
@@ -51,15 +52,32 @@ module Fastlane
51
52
  # sh "ls -la /Applications/Xcode\ 7.3.1.app"
52
53
  # sh "ls", "-la", "/Applications/Xcode 7.3.1.app"
53
54
  # sh({ "FOO" => "Hello" }, "echo $FOO")
54
- Open3.popen2e(*command) do |stdin, io, thread|
55
+ sanitized_output = false
56
+ Open3.popen2e(*command) do |command_stdin, io, thread|
57
+ # From a thread, so a command that writes a lot before reading its input cannot block on a full pipe
58
+ writer = stdin && Thread.new do
59
+ command_stdin.write(stdin)
60
+ rescue Errno::EPIPE
61
+ # The command exited without reading all of it; its exit status says what happened
62
+ ensure
63
+ command_stdin.close
64
+ end
55
65
  io.sync = true
56
66
  io.each do |line|
57
- UI.command_output(line.strip) if print_command_output
67
+ if print_command_output
68
+ # Ensure the string being stripped is in valid UTF-8 format; Otherwise warn at the end
69
+ text = line.encode('UTF-8', invalid: :replace)
70
+ UI.command_output(text.strip)
71
+ sanitized_output = true if text != line
72
+ end
58
73
  result << line
59
74
  end
60
75
  exit_status = thread.value
76
+ writer&.join
61
77
  end
62
78
 
79
+ UI.important("Command output wasn't valid UTF-8 and was sanitized. Please report the issue.") if sanitized_output
80
+
63
81
  # Checking Process::Status#exitstatus instead of #success? makes for more
64
82
  # testable code. (Tests mock exitstatus only.) This is also consistent
65
83
  # with previous implementations of sh and... probably portable to all
@@ -18,7 +18,7 @@ module Fastlane
18
18
  end
19
19
 
20
20
  def self.generate_action(name)
21
- template = File.read("#{Fastlane::ROOT}/lib/assets/custom_action_template.rb")
21
+ template = File.read("#{Fastlane::ROOT}/lib/assets/custom_action_template.rb.template")
22
22
  template.gsub!('[[NAME]]', name)
23
23
  template.gsub!('[[NAME_UP]]', name.upcase)
24
24
  template.gsub!('[[NAME_CLASS]]', name.fastlane_class + 'Action')
@@ -14,7 +14,7 @@ module Fastlane
14
14
  loop do
15
15
  url = "https://rubygems.org/api/v1/search.json?query=#{PluginManager.plugin_prefix}&page=#{page}"
16
16
  FastlaneCore::UI.verbose("RubyGems API Request: #{url}")
17
- results = JSON.parse(URI.open(url).read)
17
+ results = JSON.parse(URI.parse(url).open.read)
18
18
  break if results.count == 0
19
19
 
20
20
  plugins += results.collect do |current|
@@ -68,7 +68,7 @@ module Fastlane
68
68
  require 'json'
69
69
  require 'open-uri'
70
70
  url = "https://rubygems.org/api/v1/gems/#{name}.json"
71
- response = JSON.parse(URI.open(url).read)
71
+ response = JSON.parse(URI.parse(url).open.read)
72
72
  return !!response['version']
73
73
  rescue
74
74
  false
@@ -66,6 +66,15 @@ module Fastlane
66
66
  end
67
67
  end
68
68
 
69
+ # Returns the fastlane plugins the given gem depends on, directly or through other gems
70
+ def plugins_required_by(gem_name)
71
+ rubygem = Bundler.rubygems.find_name(gem_name).first
72
+ return [] unless rubygem
73
+ collect_bundler_runtime_dependencies([], rubygem).map(&:name).keep_if do |current|
74
+ current.start_with?(self.class.plugin_prefix)
75
+ end
76
+ end
77
+
69
78
  # Check if a plugin is added as dependency to either the
70
79
  # Gemfile or the Pluginfile
71
80
  def plugin_is_added_as_dependency?(plugin_name)
@@ -159,7 +168,7 @@ module Fastlane
159
168
  require 'open-uri'
160
169
  url = "https://rubygems.org/api/v1/gems/#{gem_name}.json"
161
170
  begin
162
- JSON.parse(URI.open(url).read)
171
+ JSON.parse(URI.parse(url).open.read)
163
172
  rescue
164
173
  nil
165
174
  end
@@ -278,11 +287,12 @@ module Fastlane
278
287
  # fastlane-plugin-[plugin_name]
279
288
  # This will make sure to load the action
280
289
  # and all its helpers
281
- def load_plugins(print_table: true)
290
+ # @param plugins [Array] the plugins to load, the available plugins by default
291
+ def load_plugins(print_table: true, plugins: nil)
282
292
  UI.verbose("Checking if there are any plugins that should be loaded...")
283
293
 
284
294
  loaded_plugins = false
285
- available_plugins.each do |gem_name|
295
+ (plugins || available_plugins).each do |gem_name|
286
296
  UI.verbose("Loading '#{gem_name}' plugin")
287
297
  begin
288
298
  # BEFORE requiring the gem, we get a list of loaded actions
@@ -306,7 +316,7 @@ module Fastlane
306
316
  end
307
317
  end
308
318
 
309
- if !loaded_plugins && self.pluginfile_content.to_s.include?(PluginManager.plugin_prefix)
319
+ if plugins.nil? && !loaded_plugins && self.pluginfile_content.to_s.include?(PluginManager.plugin_prefix)
310
320
  UI.error("It seems like you wanted to load some plugins, however they couldn't be loaded")
311
321
  UI.error("Please follow the troubleshooting guide: #{TROUBLESHOOTING_URL}")
312
322
  end
@@ -317,6 +327,12 @@ module Fastlane
317
327
  print_plugin_information(self.plugin_references) unless skip_print_plugin_info
318
328
  end
319
329
 
330
+ # Loads the plugins the given gem depends on that are not loaded yet
331
+ def load_plugins_required_by(gem_name, print_table: true)
332
+ plugins = plugins_required_by(gem_name) - self.plugin_references.keys
333
+ load_plugins(print_table: print_table, plugins: plugins) unless plugins.empty?
334
+ end
335
+
320
336
  # Prints a table all the plugins that were loaded
321
337
  def print_plugin_information(references)
322
338
  no_action_found = false
@@ -395,5 +411,21 @@ module Fastlane
395
411
  actions: references
396
412
  }
397
413
  end
414
+
415
+ private
416
+
417
+ # recursively collect runtime dependencies
418
+ def collect_bundler_runtime_dependencies(collection, source)
419
+ # Compare by name: one gem can be required with different version constraints
420
+ known = collection.map(&:name)
421
+ runtime_deps = source.dependencies.select { |d| d.type == :runtime && !known.include?(d.name) }.uniq(&:name)
422
+ collection.concat(runtime_deps)
423
+ runtime_deps.each do |d|
424
+ collect_bundler_runtime_dependencies(collection, d.to_spec)
425
+ rescue Gem::MissingSpecError
426
+ # ignoring unresolvable dependencies
427
+ end
428
+ collection
429
+ end
398
430
  end
399
431
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.files = Dir["lib/**/*"] + %w(README.md LICENSE)
16
16
  spec.require_paths = ['lib']
17
17
  spec.metadata['rubygems_mfa_required'] = 'true'
18
- spec.required_ruby_version = '>= 3.0'
18
+ spec.required_ruby_version = '>= <%= Fastlane::MINIMUM_RUBY %>'
19
19
 
20
20
  # Don't add a dependency to fastlane or fastlane_re
21
21
  # since this would cause a circular dependency
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  strategy:
10
10
  matrix:
11
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
11
+ ruby-version: ['3.2', '3.3', '3.4']
12
12
  steps:
13
13
  - uses: actions/checkout@v6
14
14
 
@@ -1,9 +1,9 @@
1
1
  ---
2
+ plugins:
3
+ - rubocop-performance
2
4
  require:
3
5
  - rubocop/require_tools
4
- - rubocop-performance
5
6
  AllCops:
6
- TargetRubyVersion: 3.0
7
7
  SuggestExtensions: false
8
8
  NewCops: enable
9
9
  Include:
@@ -13,14 +13,16 @@ AllCops:
13
13
  - "*/lib/assets/*Template"
14
14
  - "*/lib/assets/*TemplateAndroid"
15
15
  Exclude:
16
- - "**/lib/assets/custom_action_template.rb"
17
16
  - "./vendor/**/*"
18
17
  - "**/lib/assets/DefaultFastfileTemplate"
19
18
  - "**/lib/assets/MatchfileTemplate"
20
- - "**/spec/fixtures/broken_files/broken_file.rb"
21
19
  - "**/*.provisionprofile"
22
20
  Lint/ErbNewArguments:
23
21
  Enabled: false
22
+ Style/HashSyntax:
23
+ EnforcedShorthandSyntax: either
24
+ Naming/BlockForwarding:
25
+ EnforcedStyle: explicit
24
26
  Style/SlicingWithRange:
25
27
  Enabled: false
26
28
  Style/MultipleComparison:
@@ -136,7 +138,7 @@ Lint/UnusedMethodArgument:
136
138
  Lint/ParenthesesAsGroupedExpression:
137
139
  Exclude:
138
140
  - "**/spec/**/*"
139
- Naming/PredicateName:
141
+ Naming/PredicatePrefix:
140
142
  Enabled: false
141
143
  Style/PerlBackrefs:
142
144
  Enabled: false
@@ -145,8 +147,6 @@ Layout/SpaceAroundOperators:
145
147
  - "**/spec/actions_specs/xcodebuild_spec.rb"
146
148
  Naming/FileName:
147
149
  Exclude:
148
- - "**/Dangerfile"
149
- - "**/Brewfile"
150
150
  - "**/Gemfile"
151
151
  - "**/Podfile"
152
152
  - "**/Rakefile"
@@ -3,6 +3,10 @@ require_relative 'swift_runner_upgrader.rb'
3
3
 
4
4
  module Fastlane
5
5
  class SwiftLaneManager < LaneManagerBase
6
+ # The runner protocol version this fastlane ships, see main.swift
7
+ RUNNER_PROTOCOL_VERSION = 1
8
+ RUNNER_PROTOCOL_VERSION_REGEX = /FastlaneRunnerProtocolVersion \[(\d+)\]/
9
+
6
10
  # @param lane_name The name of the lane to execute
7
11
  # @param parameters [Hash] The parameters passed from the command line to the lane
8
12
  def self.cruise_lane(lane, parameters = nil, disable_runner_upgrades: false, swift_server_port: nil)
@@ -26,6 +30,7 @@ module Fastlane
26
30
  end
27
31
 
28
32
  self.ensure_runner_built!
33
+ self.warn_if_runner_outdated
29
34
  swift_server_port ||= 2000
30
35
  socket_thread = self.start_socket_thread(port: swift_server_port)
31
36
  sleep(0.250) while socket_thread[:ready].nil?
@@ -229,6 +234,17 @@ module Fastlane
229
234
  end
230
235
  end
231
236
 
237
+ # The protocol version compiled into the built runner, 0 for runners from before it had one
238
+ def self.runner_protocol_version
239
+ File.binread(FastlaneCore::FastlaneFolder.swift_runner_path)[RUNNER_PROTOCOL_VERSION_REGEX, 1].to_i
240
+ end
241
+
242
+ def self.warn_if_runner_outdated
243
+ return if runner_protocol_version >= RUNNER_PROTOCOL_VERSION
244
+
245
+ UI.important("Your FastlaneRunner is outdated for this version of fastlane. Run a lane outside CI, without `disable_runner_upgrades`, to update it, then commit the changes.")
246
+ end
247
+
232
248
  def self.ensure_runner_built!
233
249
  UI.verbose("Checking for new user-provided tool configuration files")
234
250
  # if self.link_user_configs_to_project returns true, that means we need to rebuild the runner
@@ -236,11 +252,13 @@ module Fastlane
236
252
 
237
253
  if FastlaneCore::FastlaneFolder.swift_runner_built?
238
254
  runner_last_modified_age = File.mtime(FastlaneCore::FastlaneFolder.swift_runner_path).to_i
239
- fastfile_last_modified_age = File.mtime(FastlaneCore::FastlaneFolder.fastfile_path).to_i
255
+ # The Fastfile, and the runner's own files, which an upgrade or a pull can change without touching the Fastfile
256
+ sources = [FastlaneCore::FastlaneFolder.fastfile_path] + Dir[File.join(FastlaneCore::FastlaneFolder.swift_folder_path, '**', '*.swift')]
257
+ changed = sources.find { |source| File.mtime(source).to_i > runner_last_modified_age }
240
258
 
241
- if runner_last_modified_age < fastfile_last_modified_age
242
- # It's older than the Fastfile, so build it again
243
- UI.verbose("Found changes to user's Fastfile.swift, setting re-build runner flag")
259
+ if changed
260
+ # It's older than one of its sources, so build it again
261
+ UI.verbose("Found changes to #{changed}, setting re-build runner flag")
244
262
  runner_needs_building = true
245
263
  end
246
264
  else
@@ -1,8 +1,9 @@
1
1
  module Fastlane
2
- VERSION = '2.238.0'.freeze
2
+ VERSION = '2.241.0'.freeze
3
3
  SUMMARY = "The easiest way to build and release mobile apps.".freeze
4
4
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
5
5
  MINIMUM_XCODE_RELEASE = "7.0".freeze
6
- RUBOCOP_REQUIREMENT = '1.50.2'.freeze
6
+ RUBOCOP_REQUIREMENT = '1.91.0'.freeze
7
+ MINIMUM_RUBY = '3.2.0'.freeze
7
8
  SUGGESTED_MINIMUM_RUBY = '3.3.0'.freeze
8
9
  end
@@ -17,4 +17,4 @@ public class Deliverfile: DeliverfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.238.0
20
+ // Generated with fastlane 2.241.0
@@ -179,6 +179,9 @@ public protocol DeliverfileProtocol: AnyObject {
179
179
  /// Metadata: Path to the app review attachment file
180
180
  var appReviewAttachmentFile: String? { get }
181
181
 
182
+ /// Metadata: Path to the routing app coverage file (`.geojson`) that is required for routing apps
183
+ var routingAppCoverageFile: String? { get }
184
+
182
185
  /// Metadata: The localised app description
183
186
  var description: [String: Any]? { get }
184
187
 
@@ -465,6 +468,10 @@ public extension DeliverfileProtocol {
465
468
  return nil
466
469
  }
467
470
 
471
+ var routingAppCoverageFile: String? {
472
+ return nil
473
+ }
474
+
468
475
  var description: [String: Any]? {
469
476
  return nil
470
477
  }
@@ -532,4 +539,4 @@ public extension DeliverfileProtocol {
532
539
 
533
540
  // Please don't remove the lines below
534
541
  // They are used to detect outdated files
535
- // FastlaneRunnerAPIVersion [0.9.152]
542
+ // FastlaneRunnerAPIVersion [0.9.156]