fastlane 2.178.0 → 2.179.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +93 -80
  4. data/cert/lib/cert/options.rb +1 -0
  5. data/cert/lib/cert/runner.rb +4 -0
  6. data/deliver/lib/deliver/download_screenshots.rb +1 -2
  7. data/deliver/lib/deliver/options.rb +1 -0
  8. data/deliver/lib/deliver/runner.rb +4 -0
  9. data/deliver/lib/deliver/setup.rb +0 -1
  10. data/deliver/lib/deliver/upload_metadata.rb +2 -1
  11. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +5 -0
  12. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +2 -2
  13. data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
  14. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +4 -0
  15. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  16. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +4 -0
  17. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  18. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  19. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  20. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  21. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -0
  22. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  23. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  24. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -2
  25. data/fastlane/lib/fastlane/helper/git_helper.rb +11 -7
  26. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  27. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  28. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -2
  29. data/fastlane/lib/fastlane/swift_fastlane_function.rb +4 -0
  30. data/fastlane/lib/fastlane/version.rb +1 -1
  31. data/fastlane/swift/Deliverfile.swift +1 -1
  32. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  33. data/fastlane/swift/Fastlane.swift +441 -294
  34. data/fastlane/swift/Gymfile.swift +1 -1
  35. data/fastlane/swift/GymfileProtocol.swift +1 -1
  36. data/fastlane/swift/Matchfile.swift +1 -1
  37. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  38. data/fastlane/swift/Precheckfile.swift +1 -1
  39. data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
  40. data/fastlane/swift/Scanfile.swift +1 -1
  41. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  42. data/fastlane/swift/Screengrabfile.swift +1 -1
  43. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  44. data/fastlane/swift/Snapshotfile.swift +1 -1
  45. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  46. data/fastlane/swift/formatting/Brewfile.lock.json +11 -11
  47. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +5 -3
  48. data/fastlane_core/lib/fastlane_core/helper.rb +24 -1
  49. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  50. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +13 -8
  51. data/gym/lib/gym/runner.rb +11 -4
  52. data/match/lib/match/change_password.rb +3 -3
  53. data/match/lib/match/encryption/interface.rb +1 -1
  54. data/match/lib/match/encryption/openssl.rb +2 -2
  55. data/match/lib/match/module.rb +1 -0
  56. data/pilot/lib/pilot/manager.rb +4 -0
  57. data/pilot/lib/pilot/options.rb +1 -0
  58. data/precheck/lib/precheck/options.rb +1 -0
  59. data/precheck/lib/precheck/runner.rb +4 -0
  60. data/screengrab/lib/screengrab/android_environment.rb +6 -4
  61. data/screengrab/lib/screengrab/runner.rb +1 -1
  62. data/sigh/lib/sigh/options.rb +1 -0
  63. data/sigh/lib/sigh/runner.rb +4 -0
  64. metadata +19 -16
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -196,4 +196,4 @@ public extension GymfileProtocol {
196
196
 
197
197
  // Please don't remove the lines below
198
198
  // They are used to detect outdated files
199
- // FastlaneRunnerAPIVersion [0.9.64]
199
+ // FastlaneRunnerAPIVersion [0.9.65]
@@ -17,4 +17,4 @@ public class Matchfile: MatchfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -184,4 +184,4 @@ public extension MatchfileProtocol {
184
184
 
185
185
  // Please don't remove the lines below
186
186
  // They are used to detect outdated files
187
- // FastlaneRunnerAPIVersion [0.9.58]
187
+ // FastlaneRunnerAPIVersion [0.9.59]
@@ -17,4 +17,4 @@ public class Precheckfile: PrecheckfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -12,7 +12,7 @@ public protocol PrecheckfileProtocol: class {
12
12
  var appIdentifier: String { get }
13
13
 
14
14
  /// Your Apple ID Username
15
- var username: String { get }
15
+ var username: String? { get }
16
16
 
17
17
  /// The ID of your App Store Connect team if you're in multiple teams
18
18
  var teamId: String? { get }
@@ -40,7 +40,7 @@ public extension PrecheckfileProtocol {
40
40
  var apiKeyPath: String? { return nil }
41
41
  var apiKey: [String: Any]? { return nil }
42
42
  var appIdentifier: String { return "" }
43
- var username: String { return "" }
43
+ var username: String? { return nil }
44
44
  var teamId: String? { return nil }
45
45
  var teamName: String? { return nil }
46
46
  var platform: String { return "ios" }
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
52
52
 
53
53
  // Please don't remove the lines below
54
54
  // They are used to detect outdated files
55
- // FastlaneRunnerAPIVersion [0.9.57]
55
+ // FastlaneRunnerAPIVersion [0.9.58]
@@ -17,4 +17,4 @@ public class Scanfile: ScanfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -288,4 +288,4 @@ public extension ScanfileProtocol {
288
288
 
289
289
  // Please don't remove the lines below
290
290
  // They are used to detect outdated files
291
- // FastlaneRunnerAPIVersion [0.9.69]
291
+ // FastlaneRunnerAPIVersion [0.9.70]
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.59]
99
+ // FastlaneRunnerAPIVersion [0.9.60]
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.178.0
20
+ // Generated with fastlane 2.179.0
@@ -196,4 +196,4 @@ public extension SnapshotfileProtocol {
196
196
 
197
197
  // Please don't remove the lines below
198
198
  // They are used to detect outdated files
199
- // FastlaneRunnerAPIVersion [0.9.53]
199
+ // FastlaneRunnerAPIVersion [0.9.54]
@@ -2,7 +2,7 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.47.12",
5
+ "version": "0.47.13",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "cellar": ":any_skip_relocation",
@@ -10,20 +10,20 @@
10
10
  "root_url": "https://homebrew.bintray.com/bottles",
11
11
  "files": {
12
12
  "arm64_big_sur": {
13
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.arm64_big_sur.bottle.tar.gz",
14
- "sha256": "334b736f7c78b1bc48882f55558e79571be591281462bc91dedea6dac10034be"
13
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.arm64_big_sur.bottle.tar.gz",
14
+ "sha256": "fdcdb5e94b9c4d66a32d4515ba3d2db4057865f96aefab0e41fdeaf2879f4f89"
15
15
  },
16
16
  "big_sur": {
17
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.big_sur.bottle.tar.gz",
18
- "sha256": "b7ba5043f29c548dd05374125faa61dd07690bffe373890cb608609e4a7e2413"
17
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.big_sur.bottle.tar.gz",
18
+ "sha256": "cbb7a9803926d8bfaacf5c1a7d4cd07d8fe2255b1885be3ae2ffd8414e4c5292"
19
19
  },
20
20
  "catalina": {
21
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.catalina.bottle.tar.gz",
22
- "sha256": "030b2e18168f5680c4ee387812b14057c4cb148b6f6800b983b1b298f4af15b1"
21
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.catalina.bottle.tar.gz",
22
+ "sha256": "3a13e9b1f4a63bc03601897944f71dd4e6942788531dc060322d20fc6b36d2fd"
23
23
  },
24
24
  "mojave": {
25
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.mojave.bottle.tar.gz",
26
- "sha256": "b3e35821d3094d08eb9f8423ce7d18cb5462bb5b1d02a3156ed1a10f6539709a"
25
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.mojave.bottle.tar.gz",
26
+ "sha256": "4e0691f12a5ef3b01eba9f41091b8f3457bc65151bfad057a45e8de9525074cd"
27
27
  }
28
28
  }
29
29
  }
@@ -33,9 +33,9 @@
33
33
  "system": {
34
34
  "macos": {
35
35
  "catalina": {
36
- "HOMEBREW_VERSION": "3.0.4-64-g31a4989",
36
+ "HOMEBREW_VERSION": "3.0.9-4-g9308a25",
37
37
  "HOMEBREW_PREFIX": "/usr/local",
38
- "Homebrew/homebrew-core": "443ddf805144323198a5b37b071516534243377b",
38
+ "Homebrew/homebrew-core": "2e6c683b1705308ab02e71f996733b1ad05942d0",
39
39
  "CLT": "11.0.33.12",
40
40
  "Xcode": "12.2",
41
41
  "macOS": "10.15.7"
@@ -208,8 +208,10 @@ module FastlaneCore
208
208
  #####################################################
209
209
 
210
210
  # Returns the value for a certain key. fastlane_core tries to fetch the value from different sources
211
- # if 'ask' is true and the value is not present, the user will be prompted to provide a value
212
- def fetch(key, ask: true)
211
+ # if 'ask' is true and the value is not present, the user will be prompted to provide a value if optional
212
+ # if 'force_ask' is true, the option is not required to be optional to ask
213
+ # rubocop:disable Metrics/PerceivedComplexity
214
+ def fetch(key, ask: true, force_ask: false)
213
215
  UI.crash!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
214
216
 
215
217
  option = verify_options_key!(key)
@@ -227,7 +229,7 @@ module FastlaneCore
227
229
 
228
230
  value = option.auto_convert_value(value)
229
231
  value = nil if value.nil? && !option.string? # by default boolean flags are false
230
- return value unless value.nil? && !option.optional && ask
232
+ return value unless value.nil? && (!option.optional || force_ask) && ask
231
233
 
232
234
  # fallback to asking
233
235
  if Helper.test? || !UI.interactive?
@@ -75,7 +75,7 @@ module FastlaneCore
75
75
 
76
76
  # Check for Jenkins, Travis CI, ... environment variables
77
77
  ['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD', 'GITHUB_ACTION', 'GITHUB_ACTIONS', 'BITRISE_IO', 'BUDDY'].each do |current|
78
- return true if ENV.key?(current)
78
+ return true if FastlaneCore::Env.truthy?(current)
79
79
  end
80
80
  return false
81
81
  end
@@ -377,6 +377,8 @@ module FastlaneCore
377
377
 
378
378
  # returns the path of the executable with the correct extension on Windows
379
379
  def self.get_executable_path(cmd_path)
380
+ cmd_path = localize_file_path(cmd_path)
381
+
380
382
  if self.windows?
381
383
  # PATHEXT contains the list of file extensions that Windows considers executable, semicolon separated.
382
384
  # e.g. ".COM;.EXE;.BAT;.CMD"
@@ -393,6 +395,12 @@ module FastlaneCore
393
395
  return cmd_path
394
396
  end
395
397
 
398
+ # returns the path with the platform-specific path separator (`/` on UNIX, `\` on Windows)
399
+ def self.localize_file_path(path)
400
+ # change `/` to `\` on Windows
401
+ return self.windows? ? path.gsub('/', '\\') : path
402
+ end
403
+
396
404
  # checks if given file is a valid json file
397
405
  # base taken from: http://stackoverflow.com/a/26235831/1945875
398
406
  def self.json_file?(filename)
@@ -462,5 +470,20 @@ module FastlaneCore
462
470
  UI.error("Your entries do not match. Please try again")
463
471
  end
464
472
  end
473
+
474
+ # URI.open added by `require 'open-uri'` is not available in Ruby 2.4. This helper lets you open a URI
475
+ # by choosing appropriate interface to do so depending on Ruby version. This helper is subject to be removed
476
+ # when fastlane drops Ruby 2.4 support.
477
+ def self.open_uri(*rest, &block)
478
+ require 'open-uri'
479
+
480
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5')
481
+ dup = rest.dup
482
+ uri = dup.shift
483
+ URI.parse(uri).open(*dup, &block)
484
+ else
485
+ URI.open(*rest, &block)
486
+ end
487
+ end
465
488
  end
466
489
  end
@@ -29,6 +29,10 @@ module Gym
29
29
  generator.pkg_path
30
30
  end
31
31
 
32
+ def binary_path
33
+ generator.binary_path
34
+ end
35
+
32
36
  def dsym_path
33
37
  generator.dsym_path
34
38
  end
@@ -81,28 +81,33 @@ module Gym
81
81
  Gym.cache[:ipa_path]
82
82
  end
83
83
 
84
- def pkg_path
85
- path = Gym.cache[:pkg_path]
84
+ def binary_path
85
+ path = Gym.cache[:binary_path]
86
86
  return path if path
87
87
 
88
88
  path = Dir[File.join(temporary_output_path, "*.pkg")].last
89
- # We need to process generic PKG
89
+ app_path = Dir[File.join(temporary_output_path, "*.app")].last
90
+ # We need to process generic PKG or APP
90
91
  if path
91
92
  # Try to find PKG file in the output directory, used when app thinning was not set
92
- Gym.cache[:pkg_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
93
- FileUtils.mv(path, Gym.cache[:pkg_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:pkg_path]).downcase).zero?
93
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
94
+ FileUtils.mv(path, Gym.cache[:binary_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
94
95
  elsif Dir.exist?(apps_path)
95
96
  # Try to find "generic" PKG file inside "Apps" folder, used when app thinning was set
96
97
  files = Dir[File.join(apps_path, "*.pkg")]
97
98
  # Generic PKG file doesn't have suffix so its name is the shortest
98
99
  path = files.min_by(&:length)
99
- Gym.cache[:pkg_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
100
- FileUtils.cp(path, Gym.cache[:pkg_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:pkg_path]).downcase).zero?
100
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
101
+ FileUtils.cp(path, Gym.cache[:binary_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
102
+ elsif app_path
103
+ # Try to find .app file in the output directory. This is used when macOS is set and .app is being generated.
104
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.app")
105
+ FileUtils.mv(app_path, Gym.cache[:binary_path]) unless File.expand_path(app_path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
101
106
  else
102
107
  ErrorHandler.handle_empty_pkg unless path
103
108
  end
104
109
 
105
- Gym.cache[:pkg_path]
110
+ Gym.cache[:binary_path]
106
111
  end
107
112
 
108
113
  # The path the the dsym file for this app. Might be nil
@@ -243,12 +243,12 @@ module Gym
243
243
  # Moves over the binary and dsym file to the output directory
244
244
  # @return (String) The path to the resulting pkg file
245
245
  def move_pkg
246
- FileUtils.mv(PackageCommandGenerator.pkg_path, File.expand_path(Gym.config[:output_directory]), force: true)
247
- pkg_path = File.expand_path(File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.pkg_path)))
246
+ FileUtils.mv(PackageCommandGenerator.binary_path, File.expand_path(Gym.config[:output_directory]), force: true)
247
+ binary_path = File.expand_path(File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.binary_path)))
248
248
 
249
249
  UI.success("Successfully exported and signed the pkg file:")
250
- UI.message(pkg_path)
251
- pkg_path
250
+ UI.message(binary_path)
251
+ binary_path
252
252
  end
253
253
 
254
254
  # copys framework from temp folder:
@@ -274,6 +274,13 @@ module Gym
274
274
  exe_name = Gym.project.build_settings(key: "EXECUTABLE_NAME")
275
275
  app_path = File.join(BuildCommandGenerator.archive_path, "Products/Applications/#{exe_name}.app")
276
276
 
277
+ unless File.exist?(app_path)
278
+ # Apparently the `EXECUTABLE_NAME` is not correct. This can happen when building a workspace which has a project
279
+ # earlier in the build order that has a different `EXECUTABLE_NAME` than the app. Try to find the last `.app` as
280
+ # a fallback for this situation.
281
+ app_path = Dir[File.join(BuildCommandGenerator.archive_path, "Products", "Applications", "*.app")].last
282
+ end
283
+
277
284
  UI.crash!("Couldn't find application in '#{BuildCommandGenerator.archive_path}'") unless File.exist?(app_path)
278
285
 
279
286
  joined_app_path = File.join(Gym.config[:output_directory], File.basename(app_path))
@@ -16,7 +16,7 @@ module Match
16
16
 
17
17
  ensure_ui_interactive
18
18
 
19
- to = FastlaneCore::Helper.ask_password(message: "New passphrase for Git Repo: ", confirm: true)
19
+ new_password = FastlaneCore::Helper.ask_password(message: "New passphrase for Git Repo: ", confirm: true)
20
20
 
21
21
  # Choose the right storage and encryption implementations
22
22
  storage = Storage.for_mode(params[:storage_mode], {
@@ -37,10 +37,10 @@ module Match
37
37
  encryption.decrypt_files
38
38
 
39
39
  encryption.clear_password
40
- encryption.store_password(to)
40
+ encryption.store_password(new_password)
41
41
 
42
42
  message = "[fastlane] Changed passphrase"
43
- files_to_commit = encryption.encrypt_files
43
+ files_to_commit = encryption.encrypt_files(new_password)
44
44
  storage.save_changes!(files_to_commit: files_to_commit, custom_message: message)
45
45
  end
46
46
 
@@ -3,7 +3,7 @@ module Match
3
3
  class Interface
4
4
  # Call this method to trigger the actual
5
5
  # encryption
6
- def encrypt_files
6
+ def encrypt_files(password: nil)
7
7
  not_implemented(__method__)
8
8
  end
9
9
 
@@ -28,9 +28,9 @@ module Match
28
28
  self.working_directory = working_directory
29
29
  end
30
30
 
31
- def encrypt_files
31
+ def encrypt_files(password: nil)
32
32
  files = []
33
- password = fetch_password!
33
+ password ||= fetch_password!
34
34
  iterate(self.working_directory) do |current|
35
35
  files << current
36
36
  encrypt_specific_file(path: current, password: password)
@@ -21,6 +21,7 @@ module Match
21
21
  end
22
22
 
23
23
  def self.cert_type_sym(type)
24
+ type = type.to_s
24
25
  return :mac_installer_distribution if type == "mac_installer_distribution"
25
26
  return :developer_id_installer if type == "developer_id_installer"
26
27
  return :developer_id_application if type == "developer_id"
@@ -23,6 +23,10 @@ module Pilot
23
23
  else
24
24
  config[:username] ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
25
25
 
26
+ # Username is now optional since addition of App Store Connect API Key
27
+ # Force asking for username to prompt user if not already set
28
+ config.fetch(:username, force_ask: true)
29
+
26
30
  UI.message("Login to App Store Connect (#{config[:username]})")
27
31
  Spaceship::ConnectAPI.login(config[:username], use_portal: false, use_tunes: true, tunes_team_id: config[:team_id], team_name: config[:team_name])
28
32
  UI.message("Login successful")
@@ -31,6 +31,7 @@ module Pilot
31
31
  short_option: "-u",
32
32
  env_name: "PILOT_USERNAME",
33
33
  description: "Your Apple ID Username",
34
+ optional: true,
34
35
  default_value: user,
35
36
  default_value_dynamic: true),
36
37
  FastlaneCore::ConfigItem.new(key: :app_identifier,
@@ -52,6 +52,7 @@ module Precheck
52
52
  short_option: "-u",
53
53
  env_name: "PRECHECK_USERNAME",
54
54
  description: "Your Apple ID Username",
55
+ optional: true,
55
56
  default_value: user,
56
57
  default_value_dynamic: true),
57
58
  FastlaneCore::ConfigItem.new(key: :team_id,
@@ -32,6 +32,10 @@ module Precheck
32
32
  UI.message("Creating authorization token for App Store Connect API")
33
33
  Spaceship::ConnectAPI.token = api_token
34
34
  elsif Spaceship::Tunes.client.nil?
35
+ # Username is now optional since addition of App Store Connect API Key
36
+ # Force asking for username to prompt user if not already set
37
+ Precheck.config.fetch(:username, force_ask: true)
38
+
35
39
  # Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
36
40
  # Prompts select team if multiple teams and none specified
37
41
  UI.message("Starting login with user '#{Precheck.config[:username]}'")
@@ -34,22 +34,22 @@ module Screengrab
34
34
  def find_platform_tools(android_home)
35
35
  return nil unless android_home
36
36
 
37
- platform_tools_path = File.join(android_home, 'platform-tools')
37
+ platform_tools_path = Helper.localize_file_path(File.join(android_home, 'platform-tools'))
38
38
  File.directory?(platform_tools_path) ? platform_tools_path : nil
39
39
  end
40
40
 
41
41
  def find_build_tools(android_home, build_tools_version)
42
42
  return nil unless android_home
43
43
 
44
- build_tools_dir = File.join(android_home, 'build-tools')
44
+ build_tools_dir = Helper.localize_file_path(File.join(android_home, 'build-tools'))
45
45
 
46
46
  return nil unless build_tools_dir && File.directory?(build_tools_dir)
47
47
 
48
- return File.join(build_tools_dir, build_tools_version) if build_tools_version
48
+ return Helper.localize_file_path(File.join(build_tools_dir, build_tools_version)) if build_tools_version
49
49
 
50
50
  version = select_build_tools_version(build_tools_dir)
51
51
 
52
- return version ? File.join(build_tools_dir, version) : nil
52
+ return version ? Helper.localize_file_path(File.join(build_tools_dir, version)) : nil
53
53
  end
54
54
 
55
55
  def select_build_tools_version(build_tools_dir)
@@ -74,6 +74,7 @@ module Screengrab
74
74
  return FastlaneCore::CommandExecutor.which('adb') unless platform_tools_path
75
75
 
76
76
  adb_path = Helper.get_executable_path(File.join(platform_tools_path, 'adb'))
77
+ adb_path = Helper.localize_file_path(adb_path)
77
78
  return executable_command?(adb_path) ? adb_path : nil
78
79
  end
79
80
 
@@ -81,6 +82,7 @@ module Screengrab
81
82
  return FastlaneCore::CommandExecutor.which('aapt') unless build_tools_path
82
83
 
83
84
  aapt_path = Helper.get_executable_path(File.join(build_tools_path, 'aapt'))
85
+ aapt_path = Helper.localize_file_path(aapt_path)
84
86
  return executable_command?(aapt_path) ? aapt_path : nil
85
87
  end
86
88