fastlane 2.170.0 → 2.175.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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -74
  3. data/cert/lib/cert/options.rb +2 -2
  4. data/deliver/lib/deliver/app_screenshot.rb +5 -7
  5. data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
  6. data/deliver/lib/deliver/commands_generator.rb +1 -1
  7. data/deliver/lib/deliver/loader.rb +13 -29
  8. data/deliver/lib/deliver/options.rb +2 -2
  9. data/deliver/lib/deliver/setup.rb +8 -3
  10. data/deliver/lib/deliver/upload_metadata.rb +2 -0
  11. data/deliver/lib/deliver/upload_screenshots.rb +2 -1
  12. data/fastlane/lib/fastlane/actions/adb.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/add_git_tag.rb +12 -3
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +2 -2
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -0
  16. data/fastlane/lib/fastlane/actions/appetize.rb +13 -1
  17. data/fastlane/lib/fastlane/actions/artifactory.rb +36 -3
  18. data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +10 -2
  19. data/fastlane/lib/fastlane/actions/build_app.rb +3 -1
  20. data/fastlane/lib/fastlane/actions/carthage.rb +22 -0
  21. data/fastlane/lib/fastlane/actions/cocoapods.rb +15 -1
  22. data/fastlane/lib/fastlane/actions/create_pull_request.rb +16 -1
  23. data/fastlane/lib/fastlane/actions/create_xcframework.rb +118 -0
  24. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +1 -1
  25. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  26. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
  27. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +5 -1
  28. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
  29. data/fastlane/lib/fastlane/actions/download_dsyms.rb +5 -16
  30. data/fastlane/lib/fastlane/actions/git_commit.rb +7 -3
  31. data/fastlane/lib/fastlane/actions/github_api.rb +14 -3
  32. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
  33. data/fastlane/lib/fastlane/actions/nexus_upload.rb +1 -0
  34. data/fastlane/lib/fastlane/actions/pod_push.rb +9 -0
  35. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -1
  36. data/fastlane/lib/fastlane/actions/register_device.rb +3 -3
  37. data/fastlane/lib/fastlane/actions/register_devices.rb +4 -3
  38. data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -2
  39. data/fastlane/lib/fastlane/actions/set_github_release.rb +21 -8
  40. data/fastlane/lib/fastlane/actions/slack.rb +4 -5
  41. data/fastlane/lib/fastlane/actions/spm.rb +2 -2
  42. data/fastlane/lib/fastlane/actions/swiftlint.rb +4 -4
  43. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +1 -1
  44. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +4 -2
  45. data/fastlane/lib/fastlane/cli_tools_distributor.rb +3 -0
  46. data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
  47. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  48. data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
  49. data/fastlane/lib/fastlane/version.rb +1 -1
  50. data/fastlane/swift/Actions.swift +1 -1
  51. data/fastlane/swift/Appfile.swift +1 -1
  52. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  53. data/fastlane/swift/ControlCommand.swift +1 -1
  54. data/fastlane/swift/Deliverfile.swift +2 -2
  55. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  56. data/fastlane/swift/Fastlane.swift +213 -38
  57. data/fastlane/swift/Gymfile.swift +2 -2
  58. data/fastlane/swift/GymfileProtocol.swift +11 -3
  59. data/fastlane/swift/LaneFileProtocol.swift +1 -1
  60. data/fastlane/swift/MainProcess.swift +1 -1
  61. data/fastlane/swift/Matchfile.swift +2 -2
  62. data/fastlane/swift/MatchfileProtocol.swift +2 -2
  63. data/fastlane/swift/Plugins.swift +1 -1
  64. data/fastlane/swift/Precheckfile.swift +2 -2
  65. data/fastlane/swift/PrecheckfileProtocol.swift +6 -2
  66. data/fastlane/swift/RubyCommand.swift +1 -1
  67. data/fastlane/swift/RubyCommandable.swift +1 -1
  68. data/fastlane/swift/Runner.swift +2 -2
  69. data/fastlane/swift/RunnerArgument.swift +1 -1
  70. data/fastlane/swift/Scanfile.swift +2 -2
  71. data/fastlane/swift/ScanfileProtocol.swift +14 -2
  72. data/fastlane/swift/Screengrabfile.swift +2 -2
  73. data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
  74. data/fastlane/swift/Snapshotfile.swift +2 -2
  75. data/fastlane/swift/SnapshotfileProtocol.swift +15 -3
  76. data/fastlane/swift/SocketClient.swift +1 -1
  77. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  78. data/fastlane/swift/SocketResponse.swift +1 -1
  79. data/fastlane/swift/formatting/Brewfile.lock.json +20 -14
  80. data/fastlane/swift/main.swift +1 -1
  81. data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
  82. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -1
  83. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +23 -0
  84. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +9 -5
  85. data/fastlane_core/lib/fastlane_core/helper.rb +28 -7
  86. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +41 -16
  87. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -4
  88. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  89. data/fastlane_core/lib/fastlane_core/project.rb +41 -14
  90. data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
  91. data/frameit/lib/frameit/device_types.rb +7 -1
  92. data/gym/lib/gym/error_handler.rb +8 -0
  93. data/gym/lib/gym/generators/build_command_generator.rb +3 -1
  94. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +2 -2
  95. data/gym/lib/gym/options.rb +12 -2
  96. data/match/lib/match/encryption/openssl.rb +4 -2
  97. data/match/lib/match/nuke.rb +5 -0
  98. data/match/lib/match/options.rb +2 -2
  99. data/match/lib/match/storage/git_storage.rb +14 -10
  100. data/pilot/lib/pilot/options.rb +2 -2
  101. data/precheck/lib/precheck/options.rb +8 -3
  102. data/precheck/lib/precheck/rule_processor.rb +1 -1
  103. data/precheck/lib/precheck/runner.rb +1 -1
  104. data/scan/lib/scan/options.rb +15 -0
  105. data/scan/lib/scan/runner.rb +6 -1
  106. data/scan/lib/scan/slack_poster.rb +4 -1
  107. data/scan/lib/scan/test_command_generator.rb +3 -1
  108. data/screengrab/lib/screengrab/android_environment.rb +2 -2
  109. data/screengrab/lib/screengrab/runner.rb +2 -0
  110. data/sigh/lib/sigh/options.rb +2 -2
  111. data/sigh/lib/sigh/runner.rb +1 -1
  112. data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
  113. data/snapshot/lib/snapshot/options.rb +17 -2
  114. data/snapshot/lib/snapshot/update.rb +1 -1
  115. data/spaceship/README.md +2 -2
  116. data/spaceship/lib/spaceship/client.rb +14 -1
  117. data/spaceship/lib/spaceship/connect_api/api_client.rb +17 -2
  118. data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -0
  119. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
  120. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +9 -0
  121. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +24 -0
  122. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +26 -4
  123. data/spaceship/lib/spaceship/connect_api/models/device.rb +26 -0
  124. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +53 -0
  125. data/spaceship/lib/spaceship/connect_api/response.rb +3 -1
  126. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +12 -0
  127. data/spaceship/lib/spaceship/connect_api/token.rb +1 -1
  128. data/spaceship/lib/spaceship/playground.rb +2 -2
  129. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  130. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +1 -0
  131. data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
  132. metadata +51 -21
  133. data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
  134. data/spaceship/lib/spaceship/connect_api/models/.app_data_usage_data_protection.rb.swp +0 -0
@@ -127,6 +127,14 @@ module Gym
127
127
  UI.build_failure!("Archive invalid")
128
128
  end
129
129
 
130
+ def handle_empty_ipa
131
+ UI.build_failure!("IPA invalid")
132
+ end
133
+
134
+ def handle_empty_pkg
135
+ UI.build_failure!("PKG invalid")
136
+ end
137
+
130
138
  private
131
139
 
132
140
  # Just to make things easier
@@ -39,7 +39,9 @@ module Gym
39
39
  options << "-destination '#{config[:destination]}'" if config[:destination]
40
40
  options << "-archivePath #{archive_path.shellescape}" unless config[:skip_archive]
41
41
  options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
42
- options << "-scmProvider system" if config[:use_system_scm]
42
+ if config[:use_system_scm] && !options.include?("-scmProvider system")
43
+ options << "-scmProvider system"
44
+ end
43
45
  options << config[:xcargs] if config[:xcargs]
44
46
  options << "OTHER_SWIFT_FLAGS=\"-Xfrontend -debug-time-function-bodies\"" if config[:analyze_build_time]
45
47
 
@@ -75,7 +75,7 @@ module Gym
75
75
  Gym.cache[:ipa_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
76
76
  FileUtils.cp(path, Gym.cache[:ipa_path]) unless File.expand_path(path).casecmp?(File.expand_path(Gym.cache[:ipa_path]).downcase)
77
77
  else
78
- ErrorHandler.handle_empty_archive unless path
78
+ ErrorHandler.handle_empty_ipa unless path
79
79
  end
80
80
 
81
81
  Gym.cache[:ipa_path]
@@ -99,7 +99,7 @@ module Gym
99
99
  Gym.cache[:pkg_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
100
100
  FileUtils.cp(path, Gym.cache[:pkg_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:pkg_path]).downcase).zero?
101
101
  else
102
- ErrorHandler.handle_empty_archive unless path
102
+ ErrorHandler.handle_empty_pkg unless path
103
103
  end
104
104
 
105
105
  Gym.cache[:pkg_path]
@@ -105,11 +105,11 @@ module Gym
105
105
  FastlaneCore::ConfigItem.new(key: :export_method,
106
106
  short_option: "-j",
107
107
  env_name: "GYM_EXPORT_METHOD",
108
- description: "Method used to export the archive. Valid values are: app-store, ad-hoc, package, enterprise, development, developer-id",
108
+ description: "Method used to export the archive. Valid values are: app-store, validation, ad-hoc, package, enterprise, development, developer-id and mac-application",
109
109
  type: String,
110
110
  optional: true,
111
111
  verify_block: proc do |value|
112
- av = %w(app-store ad-hoc package enterprise development developer-id)
112
+ av = %w(app-store validation ad-hoc package enterprise development developer-id mac-application)
113
113
  UI.user_error!("Unsupported export_method '#{value}', must be: #{av}") unless av.include?(value)
114
114
  end),
115
115
  FastlaneCore::ConfigItem.new(key: :export_options,
@@ -280,6 +280,16 @@ module Gym
280
280
  description: "Sets a custom path for Swift Package Manager dependencies",
281
281
  type: String,
282
282
  optional: true),
283
+ FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
284
+ env_name: "GYM_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
285
+ description: "Skips resolution of Swift Package Manager dependencies",
286
+ type: Boolean,
287
+ default_value: false),
288
+ FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
289
+ env_name: "GYM_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
290
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
291
+ type: Boolean,
292
+ default_value: false),
283
293
  FastlaneCore::ConfigItem.new(key: :use_system_scm,
284
294
  env_name: "GYM_USE_SYSTEM_SCM",
285
295
  description: "Lets xcodebuild use system's scm configuration",
@@ -30,6 +30,7 @@ module Match
30
30
 
31
31
  def encrypt_files
32
32
  files = []
33
+ password = fetch_password!
33
34
  iterate(self.working_directory) do |current|
34
35
  files << current
35
36
  encrypt_specific_file(path: current, password: password)
@@ -41,6 +42,7 @@ module Match
41
42
 
42
43
  def decrypt_files
43
44
  files = []
45
+ password = fetch_password!
44
46
  iterate(self.working_directory) do |current|
45
47
  files << current
46
48
  begin
@@ -50,7 +52,7 @@ module Match
50
52
  UI.error("Couldn't decrypt the repo, please make sure you enter the right password!")
51
53
  UI.user_error!("Invalid password passed via 'MATCH_PASSWORD'") if ENV["MATCH_PASSWORD"]
52
54
  clear_password
53
- self.decrypt_files # call itself
55
+ self.decrypt_files # Call itself
54
56
  return
55
57
  end
56
58
  UI.success("🔓 Decrypted '#{File.basename(current)}'") if FastlaneCore::Globals.verbose?
@@ -83,7 +85,7 @@ module Match
83
85
  end
84
86
 
85
87
  # Access the MATCH_PASSWORD, either from ENV variable, Keychain or user input
86
- def password
88
+ def fetch_password!
87
89
  password = ENV["MATCH_PASSWORD"]
88
90
  unless password
89
91
  item = Security::InternetPassword.find(server: server_name(self.keychain_name))
@@ -36,6 +36,11 @@ module Match
36
36
  git_branch: params[:git_branch],
37
37
  git_full_name: params[:git_full_name],
38
38
  git_user_email: params[:git_user_email],
39
+
40
+ git_private_key: params[:git_private_key],
41
+ git_basic_authorization: params[:git_basic_authorization],
42
+ git_bearer_authorization: params[:git_bearer_authorization],
43
+
39
44
  clone_branch_directly: params[:clone_branch_directly],
40
45
  google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
41
46
  google_cloud_keys_file: params[:google_cloud_keys_file].to_s,
@@ -74,7 +74,7 @@ module Match
74
74
 
75
75
  # App Store Connect API
76
76
  FastlaneCore::ConfigItem.new(key: :api_key_path,
77
- env_name: "SIGH_API_KEY_PATH",
77
+ env_names: ["SIGH_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
78
78
  description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
79
79
  optional: true,
80
80
  conflicting_options: [:api_key],
@@ -82,7 +82,7 @@ module Match
82
82
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
83
83
  end),
84
84
  FastlaneCore::ConfigItem.new(key: :api_key,
85
- env_name: "SIGH_API_KEY",
85
+ env_names: ["SIGH_API_KEY", "APP_STORE_CONNECT_API_KEY"],
86
86
  description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
87
87
  type: Hash,
88
88
  optional: true,
@@ -89,15 +89,7 @@ module Match
89
89
  command += " -b #{self.branch.shellescape} --single-branch"
90
90
  end
91
91
 
92
- unless self.git_private_key.nil?
93
- if File.file?(self.git_private_key)
94
- ssh_add = File.expand_path(self.git_private_key).shellescape.to_s
95
- else
96
- UI.message("Private key file does not exist, will continue by using it as a raw key.")
97
- ssh_add = "- <<< \"#{self.git_private_key}\""
98
- end
99
- command = "ssh-agent bash -c 'ssh-add #{ssh_add}; #{command}'"
100
- end
92
+ command = command_from_private_key(command) unless self.git_private_key.nil?
101
93
 
102
94
  UI.message("Cloning remote git repo...")
103
95
  if self.branch && !self.clone_branch_directly
@@ -170,6 +162,16 @@ module Match
170
162
  Dir[File.join(working_directory, "**", file_name, "*.#{file_ext}")]
171
163
  end
172
164
 
165
+ def command_from_private_key(command)
166
+ if File.file?(self.git_private_key)
167
+ ssh_add = File.expand_path(self.git_private_key).shellescape.to_s
168
+ else
169
+ UI.message("Private key file does not exist, will continue by using it as a raw key.")
170
+ ssh_add = "- <<< \"#{self.git_private_key}\""
171
+ end
172
+ return "ssh-agent bash -c 'ssh-add #{ssh_add}; #{command}'"
173
+ end
174
+
173
175
  private
174
176
 
175
177
  # Create and checkout an specific branch in the git repo
@@ -231,7 +233,9 @@ module Match
231
233
  def git_push(commands: [], commit_message: nil)
232
234
  commit_message ||= generate_commit_message
233
235
  commands << "git commit -m #{commit_message.shellescape}"
234
- commands << "git push origin #{self.branch.shellescape}"
236
+ git_push_command = "git push origin #{self.branch.shellescape}"
237
+ git_push_command = command_from_private_key(git_push_command) unless self.git_private_key.nil?
238
+ commands << git_push_command
235
239
 
236
240
  UI.message("Pushing changes to remote git repo...")
237
241
  Helper.with_env_values('GIT_TERMINAL_PROMPT' => '0') do
@@ -11,7 +11,7 @@ module Pilot
11
11
 
12
12
  [
13
13
  FastlaneCore::ConfigItem.new(key: :api_key_path,
14
- env_name: "PILOT_API_KEY_PATH",
14
+ env_names: ["PILOT_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
15
15
  description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
16
16
  optional: true,
17
17
  conflicting_options: [:username],
@@ -19,7 +19,7 @@ module Pilot
19
19
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
20
20
  end),
21
21
  FastlaneCore::ConfigItem.new(key: :api_key,
22
- env_name: "PILOT_API_KEY",
22
+ env_names: ["PILOT_API_KEY", "APP_STORE_CONNECT_API_KEY"],
23
23
  description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
24
24
  type: Hash,
25
25
  optional: true,
@@ -26,7 +26,7 @@ module Precheck
26
26
 
27
27
  [
28
28
  FastlaneCore::ConfigItem.new(key: :api_key_path,
29
- env_name: "PRECHECK_API_KEY_PATH",
29
+ env_names: ["PRECHECK_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
30
30
  description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
31
31
  optional: true,
32
32
  conflicting_options: [:username],
@@ -34,7 +34,7 @@ module Precheck
34
34
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
35
35
  end),
36
36
  FastlaneCore::ConfigItem.new(key: :api_key,
37
- env_name: "PRECHECK_API_KEY",
37
+ env_names: ["PRECHECK_API_KEY", "APP_STORE_CONNECT_API_KEY"],
38
38
  description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
39
39
  type: Hash,
40
40
  optional: true,
@@ -97,7 +97,12 @@ module Precheck
97
97
  description: "Should check in-app purchases?",
98
98
  is_string: false,
99
99
  optional: true,
100
- default_value: true)
100
+ default_value: true),
101
+ FastlaneCore::ConfigItem.new(key: :use_live,
102
+ env_name: "PRECHECK_USE_LIVE",
103
+ description: "Should force check live app?",
104
+ is_string: false,
105
+ default_value: false)
101
106
  ] + rules
102
107
  end
103
108
  end
@@ -130,7 +130,7 @@ module Precheck
130
130
  items = []
131
131
 
132
132
  # App info localizations
133
- app_info = app.fetch_edit_app_info
133
+ app_info = Precheck.config[:use_live] ? app.fetch_live_app_info : app.fetch_latest_app_info
134
134
  app_info_localizations = app_info.get_app_info_localizations
135
135
  app_info_localizations.each do |localization|
136
136
  items << collect_text_items_from_language_item(locale: localization.locale,
@@ -185,7 +185,7 @@ module Precheck
185
185
 
186
186
  def latest_app_version
187
187
  platform = Spaceship::ConnectAPI::Platform.map(Precheck.config[:platform])
188
- @latest_version ||= app.get_edit_app_store_version(platform: platform)
188
+ @latest_version ||= Precheck.config[:use_live] ? app.get_live_app_store_version(platform: platform) : app.get_latest_app_store_version(platform: platform)
189
189
  end
190
190
 
191
191
  # Makes sure the current App ID exists. If not, it will show an appropriate error message
@@ -411,6 +411,11 @@ module Scan
411
411
  description: "Only post on Slack if the tests fail",
412
412
  is_string: false,
413
413
  default_value: false),
414
+ FastlaneCore::ConfigItem.new(key: :slack_default_payloads,
415
+ env_name: "SCAN_SLACK_DEFAULT_PAYLOADS",
416
+ description: "Specifies default payloads to include in Slack messages. For more info visit https://docs.fastlane.tools/actions/slack",
417
+ optional: true,
418
+ type: Array),
414
419
 
415
420
  # misc
416
421
  FastlaneCore::ConfigItem.new(key: :destination,
@@ -446,6 +451,16 @@ module Scan
446
451
  description: "Sets a custom path for Swift Package Manager dependencies",
447
452
  type: String,
448
453
  optional: true),
454
+ FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
455
+ env_name: "SCAN_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
456
+ description: "Skips resolution of Swift Package Manager dependencies",
457
+ type: Boolean,
458
+ default_value: false),
459
+ FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
460
+ env_name: "SCAN_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
461
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
462
+ type: Boolean,
463
+ default_value: false),
449
464
  FastlaneCore::ConfigItem.new(key: :use_system_scm,
450
465
  env_name: "SCAN_USE_SYSTEM_SCM",
451
466
  description: "Lets xcodebuild use system's scm configuration",
@@ -83,7 +83,12 @@ module Scan
83
83
  end
84
84
 
85
85
  def handle_results(tests_exit_status)
86
- return if Scan.config[:disable_xcpretty]
86
+ if Scan.config[:disable_xcpretty]
87
+ unless tests_exit_status == 0
88
+ UI.test_failure!("Test execution failed. Exit status: #{tests_exit_status}")
89
+ end
90
+ return
91
+ end
87
92
 
88
93
  result = TestResultParser.new.parse_result(test_results)
89
94
  SlackPoster.new.run(result)
@@ -1,5 +1,6 @@
1
1
  require 'fastlane/action'
2
2
  require 'fastlane/actions/slack'
3
+ require 'fastlane_core/configuration/configuration'
3
4
 
4
5
  require_relative 'module'
5
6
 
@@ -43,7 +44,7 @@ module Scan
43
44
  }
44
45
  end
45
46
 
46
- Fastlane::Actions::SlackAction.run({
47
+ options = FastlaneCore::Configuration.create(Fastlane::Actions::SlackAction.available_options, {
47
48
  message: "#{Scan.config[:app_name] || Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
48
49
  channel: channel,
49
50
  slack_url: Scan.config[:slack_url].to_s,
@@ -51,10 +52,12 @@ module Scan
51
52
  username: username,
52
53
  icon_url: icon_url,
53
54
  payload: {},
55
+ default_payloads: Scan.config[:slack_default_payloads],
54
56
  attachment_properties: {
55
57
  fields: fields
56
58
  }
57
59
  })
60
+ Fastlane::Actions::SlackAction.run(options)
58
61
  end
59
62
  end
60
63
  end
@@ -32,13 +32,15 @@ module Scan
32
32
 
33
33
  options = []
34
34
  options += project_path_array unless config[:xctestrun]
35
- options << "-scmProvider system" if config[:use_system_scm]
36
35
  options << "-sdk '#{config[:sdk]}'" if config[:sdk]
37
36
  options << destination # generated in `detect_values`
38
37
  options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
39
38
  if config[:derived_data_path] && !options.include?("-derivedDataPath #{config[:derived_data_path].shellescape}")
40
39
  options << "-derivedDataPath #{config[:derived_data_path].shellescape}"
41
40
  end
41
+ if config[:use_system_scm] && !options.include?("-scmProvider system")
42
+ options << "-scmProvider system"
43
+ end
42
44
  options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
43
45
  if FastlaneCore::Helper.xcode_at_least?(10)
44
46
  options << "-parallel-testing-worker-count #{config[:concurrent_workers]}" if config[:concurrent_workers]
@@ -73,14 +73,14 @@ module Screengrab
73
73
  def find_adb(platform_tools_path)
74
74
  return FastlaneCore::CommandExecutor.which('adb') unless platform_tools_path
75
75
 
76
- adb_path = File.join(platform_tools_path, 'adb')
76
+ adb_path = Helper.get_executable_path(File.join(platform_tools_path, 'adb'))
77
77
  return executable_command?(adb_path) ? adb_path : nil
78
78
  end
79
79
 
80
80
  def find_aapt(build_tools_path)
81
81
  return FastlaneCore::CommandExecutor.which('aapt') unless build_tools_path
82
82
 
83
- aapt_path = File.join(build_tools_path, 'aapt')
83
+ aapt_path = Helper.get_executable_path(File.join(build_tools_path, 'aapt'))
84
84
  return executable_command?(aapt_path) ? aapt_path : nil
85
85
  end
86
86
 
@@ -24,6 +24,8 @@ module Screengrab
24
24
  end
25
25
 
26
26
  def run
27
+ # Standardize the locales
28
+ @config[:locales].map! { |locale| locale.gsub("_", "-") }
27
29
  FastlaneCore::PrintTable.print_values(config: @config, hide_keys: [], title: "Summary for screengrab #{Fastlane::VERSION}")
28
30
 
29
31
  app_apk_path = @config.fetch(:app_apk_path, ask: false)
@@ -57,7 +57,7 @@ module Sigh
57
57
 
58
58
  # App Store Connect API
59
59
  FastlaneCore::ConfigItem.new(key: :api_key_path,
60
- env_name: "SIGH_API_KEY_PATH",
60
+ env_names: ["SIGH_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
61
61
  description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
62
62
  optional: true,
63
63
  conflicting_options: [:api_key],
@@ -65,7 +65,7 @@ module Sigh
65
65
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
66
66
  end),
67
67
  FastlaneCore::ConfigItem.new(key: :api_key,
68
- env_name: "SIGH_API_KEY",
68
+ env_names: ["SIGH_API_KEY", "APP_STORE_CONNECT_API_KEY"],
69
69
  description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
70
70
  type: Hash,
71
71
  optional: true,
@@ -327,7 +327,7 @@ module Sigh
327
327
  UI.important("Found more than one code signing identity. Choosing the first one. Check out `fastlane sigh --help` to see all available options.")
328
328
  UI.important("Available Code Signing Identities for current filters:")
329
329
  certificates.each do |c|
330
- str = ["\t- Name:", c.display_name, "- ID:", c.id + " - Expires", c.expires.strftime("%d/%m/%Y")].join(" ")
330
+ str = ["\t- Name:", c.display_name, "- ID:", c.id + " - Expires", Time.parse(c.expiration_date).strftime("%Y-%m-%d")].join(" ")
331
331
  UI.message(str.green)
332
332
  end
333
333
  end
@@ -227,7 +227,7 @@ open class Snapshot: NSObject {
227
227
  #if os(OSX)
228
228
  let homeDir = URL(fileURLWithPath: NSHomeDirectory())
229
229
  return homeDir.appendingPathComponent(cachePath)
230
- #elseif arch(i386) || arch(x86_64)
230
+ #elseif arch(i386) || arch(x86_64) || arch(arm64)
231
231
  guard let simulatorHostHome = ProcessInfo().environment["SIMULATOR_HOST_HOME"] else {
232
232
  throw SnapshotError.cannotFindSimulatorHomeDirectory
233
233
  }
@@ -123,7 +123,7 @@ module Snapshot
123
123
  type: Boolean),
124
124
  FastlaneCore::ConfigItem.new(key: :override_status_bar,
125
125
  env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR',
126
- description: "Enabling this option wil automatically override the status bar to show 9:41 AM, full battery, and full reception",
126
+ description: "Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception",
127
127
  default_value: false,
128
128
  is_string: false),
129
129
  FastlaneCore::ConfigItem.new(key: :localize_simulator,
@@ -253,6 +253,16 @@ module Snapshot
253
253
  description: "Sets a custom path for Swift Package Manager dependencies",
254
254
  type: String,
255
255
  optional: true),
256
+ FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
257
+ env_name: "SNAPSHOT_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
258
+ description: "Skips resolution of Swift Package Manager dependencies",
259
+ type: Boolean,
260
+ default_value: false),
261
+ FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
262
+ env_name: "SNAPSHOT_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
263
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
264
+ type: Boolean,
265
+ default_value: false),
256
266
  FastlaneCore::ConfigItem.new(key: :testplan,
257
267
  env_name: "SNAPSHOT_TESTPLAN",
258
268
  description: "The testplan associated with the scheme that should be used for testing",
@@ -283,7 +293,12 @@ module Snapshot
283
293
  env_name: "SNAPSHOT_SUPPRESS_XCODE_OUTPUT",
284
294
  description: "Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path",
285
295
  type: Boolean,
286
- optional: true)
296
+ optional: true),
297
+ FastlaneCore::ConfigItem.new(key: :use_system_scm,
298
+ env_name: "SNAPSHOT_USE_SYSTEM_SCM",
299
+ description: "Lets xcodebuild use system's scm configuration",
300
+ type: Boolean,
301
+ default_value: false)
287
302
  ]
288
303
  end
289
304
  end