fastlane 2.174.0 → 2.179.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) 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 +3 -2
  5. data/cert/lib/cert/runner.rb +5 -1
  6. data/deliver/lib/deliver/app_screenshot.rb +6 -2
  7. data/deliver/lib/deliver/download_screenshots.rb +1 -2
  8. data/deliver/lib/deliver/options.rb +3 -2
  9. data/deliver/lib/deliver/runner.rb +12 -4
  10. data/deliver/lib/deliver/setup.rb +0 -1
  11. data/deliver/lib/deliver/upload_metadata.rb +5 -4
  12. data/deliver/lib/deliver/upload_screenshots.rb +12 -11
  13. data/fastlane/lib/fastlane/actions/adb.rb +1 -1
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +8 -3
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +7 -4
  16. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  17. data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
  19. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +4 -0
  20. data/fastlane/lib/fastlane/actions/commit_github_file.rb +11 -1
  21. data/fastlane/lib/fastlane/actions/create_xcframework.rb +5 -0
  22. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +1 -1
  23. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  24. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
  25. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  26. data/fastlane/lib/fastlane/actions/download_dsyms.rb +5 -15
  27. data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
  28. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +4 -0
  29. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  30. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  31. data/fastlane/lib/fastlane/actions/git_commit.rb +1 -1
  32. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  33. data/fastlane/lib/fastlane/actions/github_api.rb +2 -1
  34. data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -1
  35. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  36. data/fastlane/lib/fastlane/actions/jazzy.rb +10 -1
  37. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +3 -2
  38. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  39. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +0 -1
  40. data/fastlane/lib/fastlane/actions/register_device.rb +3 -3
  41. data/fastlane/lib/fastlane/actions/register_devices.rb +3 -3
  42. data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
  43. data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -3
  44. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  45. data/fastlane/lib/fastlane/actions/swiftlint.rb +1 -1
  46. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +1 -1
  47. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -2
  48. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
  49. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -1
  50. data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
  51. data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
  52. data/fastlane/lib/fastlane/fast_file.rb +9 -5
  53. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  54. data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
  55. data/fastlane/lib/fastlane/helper/git_helper.rb +11 -7
  56. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  57. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  58. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -2
  59. data/fastlane/lib/fastlane/swift_fastlane_function.rb +4 -0
  60. data/fastlane/lib/fastlane/version.rb +1 -1
  61. data/fastlane/swift/Deliverfile.swift +1 -1
  62. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  63. data/fastlane/swift/Fastlane.swift +491 -315
  64. data/fastlane/swift/Gymfile.swift +1 -1
  65. data/fastlane/swift/GymfileProtocol.swift +1 -1
  66. data/fastlane/swift/Matchfile.swift +1 -1
  67. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  68. data/fastlane/swift/Precheckfile.swift +1 -1
  69. data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
  70. data/fastlane/swift/Scanfile.swift +1 -1
  71. data/fastlane/swift/ScanfileProtocol.swift +9 -1
  72. data/fastlane/swift/Screengrabfile.swift +1 -1
  73. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  74. data/fastlane/swift/Snapshotfile.swift +1 -1
  75. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  76. data/fastlane/swift/formatting/Brewfile.lock.json +13 -11
  77. data/fastlane_core/lib/fastlane_core.rb +1 -0
  78. data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
  79. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -1
  80. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +23 -0
  81. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +6 -6
  82. data/fastlane_core/lib/fastlane_core/helper.rb +50 -6
  83. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  84. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
  85. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  86. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
  87. data/fastlane_core/lib/fastlane_core/project.rb +3 -14
  88. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +2 -2
  89. data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
  90. data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
  91. data/gym/lib/gym/.runner.rb.swp +0 -0
  92. data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
  93. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  94. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +13 -8
  95. data/gym/lib/gym/runner.rb +11 -4
  96. data/match/lib/match/change_password.rb +3 -3
  97. data/match/lib/match/encryption/interface.rb +1 -1
  98. data/match/lib/match/encryption/openssl.rb +2 -2
  99. data/match/lib/match/importer.rb +1 -1
  100. data/match/lib/match/migrate.rb +1 -1
  101. data/match/lib/match/module.rb +1 -0
  102. data/match/lib/match/nuke.rb +6 -1
  103. data/match/lib/match/options.rb +2 -2
  104. data/match/lib/match/runner.rb +1 -1
  105. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  106. data/match/lib/match/storage/s3_storage.rb +1 -1
  107. data/pilot/lib/pilot/build_manager.rb +25 -8
  108. data/pilot/lib/pilot/manager.rb +5 -1
  109. data/pilot/lib/pilot/options.rb +6 -5
  110. data/precheck/lib/precheck/options.rb +3 -2
  111. data/precheck/lib/precheck/runner.rb +6 -2
  112. data/scan/lib/scan/detect_values.rb +4 -1
  113. data/scan/lib/scan/options.rb +10 -0
  114. data/scan/lib/scan/runner.rb +27 -0
  115. data/screengrab/lib/screengrab/android_environment.rb +8 -6
  116. data/screengrab/lib/screengrab/runner.rb +2 -3
  117. data/sigh/lib/sigh/download_all.rb +1 -1
  118. data/sigh/lib/sigh/options.rb +3 -2
  119. data/sigh/lib/sigh/runner.rb +5 -1
  120. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
  121. data/spaceship/README.md +2 -2
  122. data/spaceship/lib/spaceship/client.rb +18 -17
  123. data/spaceship/lib/spaceship/connect_api/api_client.rb +24 -6
  124. data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
  125. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
  126. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
  127. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
  128. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
  129. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  130. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  131. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
  132. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
  133. data/spaceship/lib/spaceship/connect_api/token.rb +2 -2
  134. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
  135. data/spaceship/lib/spaceship/playground.rb +2 -2
  136. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  137. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +41 -28
  138. metadata +41 -22
@@ -99,7 +99,7 @@ module FastlaneCore
99
99
  UI.important("Enter the password for #{keychain_path}")
100
100
  UI.important("This passphrase will be stored in your local keychain with the name #{server} and used in future runs")
101
101
  UI.important("This prompt can be avoided by specifying the 'keychain_password' option or 'MATCH_KEYCHAIN_PASSWORD' environment variable")
102
- keychain_password = FastlaneCore::Helper.ask_password(message: "Password for #{keychain_name} keychain: ", confirm: true)
102
+ keychain_password = FastlaneCore::Helper.ask_password(message: "Password for #{keychain_name} keychain: ", confirm: true, confirmation_message: "Type password for #{keychain_name} keychain again: ")
103
103
  Security::InternetPassword.add(server, "", keychain_password)
104
104
  else
105
105
  UI.important("Keychain password for #{keychain_path} was not specified and not found in your keychain. Specify the 'keychain_password' option to prevent the UI permission popup when code signing")
@@ -1,4 +1,5 @@
1
1
  require 'digest/md5'
2
+ require 'securerandom'
2
3
 
3
4
  require_relative 'globals'
4
5
  require_relative 'ui/ui'
@@ -12,7 +13,7 @@ module FastlaneCore
12
13
  attr_accessor :package_path
13
14
 
14
15
  def generate(app_id: nil, pkg_path: nil, package_path: nil, platform: "osx")
15
- self.package_path = File.join(package_path, "#{app_id}.itmsp")
16
+ self.package_path = File.join(package_path, "#{app_id}-#{SecureRandom.uuid}.itmsp")
16
17
  FileUtils.rm_rf(self.package_path) if File.directory?(self.package_path)
17
18
  FileUtils.mkdir_p(self.package_path)
18
19
 
@@ -32,7 +33,7 @@ module FastlaneCore
32
33
  File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
33
34
  UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
34
35
 
35
- package_path
36
+ return self.package_path
36
37
  end
37
38
 
38
39
  private
@@ -68,22 +68,13 @@ module FastlaneCore
68
68
  # Is this project a workspace?
69
69
  attr_accessor :is_workspace
70
70
 
71
- # Should the output of xcodebuild commands be silenced?
72
- attr_accessor :xcodebuild_list_silent
73
-
74
- # Should we redirect stderr to /dev/null for xcodebuild commands?
75
- # Gets rid of annoying plugin info warnings.
76
- attr_accessor :xcodebuild_suppress_stderr
77
-
78
71
  # @param options [FastlaneCore::Configuration|Hash] a set of configuration to run xcodebuild to work out build settings
79
72
  # @param xcodebuild_list_silent [Boolean] a flag to silent xcodebuild command's output
80
73
  # @param xcodebuild_suppress_stderr [Boolean] a flag to supress output to stderr from xcodebuild
81
- def initialize(options, xcodebuild_list_silent: false, xcodebuild_suppress_stderr: false)
74
+ def initialize(options)
82
75
  @options = options
83
76
  @path = File.expand_path(self.options[:workspace] || self.options[:project])
84
77
  @is_workspace = (self.options[:workspace].to_s.length > 0)
85
- @xcodebuild_list_silent = xcodebuild_list_silent
86
- @xcodebuild_suppress_stderr = xcodebuild_suppress_stderr
87
78
 
88
79
  if !path || !File.directory?(path)
89
80
  UI.user_error!("Could not find project at path '#{path}'")
@@ -365,14 +356,12 @@ module FastlaneCore
365
356
  else
366
357
  command = "xcodebuild clean -showBuildSettings #{xcodebuild_parameters.join(' ')}"
367
358
  end
368
- command += " 2> /dev/null" if xcodebuild_suppress_stderr
369
359
  command
370
360
  end
371
361
 
372
362
  def build_xcodebuild_resolvepackagedependencies_command
373
363
  return nil if options[:skip_package_dependencies_resolution]
374
364
  command = "xcodebuild -resolvePackageDependencies #{xcodebuild_parameters.join(' ')}"
375
- command += " 2> /dev/null" if xcodebuild_suppress_stderr
376
365
  command
377
366
  end
378
367
 
@@ -395,7 +384,7 @@ module FastlaneCore
395
384
  FastlaneCore::CommandExecutor.execute(
396
385
  command: command,
397
386
  print_all: true,
398
- print_command: !self.xcodebuild_list_silent
387
+ print_command: true
399
388
  )
400
389
  else
401
390
  UI.important("Skipped Swift Package Manager dependencies resolution.")
@@ -408,7 +397,7 @@ module FastlaneCore
408
397
  begin
409
398
  timeout = FastlaneCore::Project.xcode_build_settings_timeout
410
399
  retries = FastlaneCore::Project.xcode_build_settings_retries
411
- @build_settings = FastlaneCore::Project.run_command(command, timeout: timeout, retries: retries, print: !self.xcodebuild_list_silent)
400
+ @build_settings = FastlaneCore::Project.run_command(command, timeout: timeout, retries: retries, print: true)
412
401
  if @build_settings.empty?
413
402
  UI.error("Could not read build settings. Make sure that the scheme \"#{options[:scheme]}\" is configured for running by going to Product → Scheme → Edit Scheme…, selecting the \"Build\" section, checking the \"Run\" checkbox and closing the scheme window.")
414
403
  end
@@ -1,12 +1,12 @@
1
1
  require 'thread'
2
2
 
3
- module Deliver
3
+ module FastlaneCore
4
4
  # This dispatches jobs to worker threads and make it work in parallel.
5
5
  # It's suitable for I/O bounds works and not for CPU bounds works.
6
6
  # Use this when you have all the items that you'll process in advance.
7
7
  # Simply enqueue them to this and call `QueueWorker#start`.
8
8
  class QueueWorker
9
- NUMBER_OF_THREADS = Helper.test? ? 1 : [ENV.fetch("DELIVER_NUMBER_OF_THREADS", 10).to_i, 10].min
9
+ NUMBER_OF_THREADS = FastlaneCore::Helper.test? ? 1 : [(ENV["DELIVER_NUMBER_OF_THREADS"] || ENV.fetch("FL_NUMBER_OF_THREADS", 10)).to_i, 10].min
10
10
 
11
11
  # @param concurrency (Numeric) - A number of threads to be created
12
12
  # @param block (Proc) - A task you want to execute with enqueued items
@@ -138,7 +138,7 @@ module FastlaneCore
138
138
  # Basically this should be used when you actively catch the error
139
139
  # and want to show a nice error message to the user
140
140
  def user_error!(error_message, options = {})
141
- raise FastlaneError.new(options), error_message.to_s
141
+ raise FastlaneError.new(show_github_issues: options[:show_github_issues], error_info: options[:error_info]), error_message.to_s
142
142
  end
143
143
 
144
144
  # Use this method to exit the program because of a shell command
@@ -63,7 +63,7 @@ module FastlaneCore
63
63
  if !Helper.bundler? && !Helper.contained_fastlane? && Random.rand(5) == 1
64
64
  # We want to show this message from time to time, if the user doesn't use bundler, nor bundled fastlane
65
65
  puts('#######################################################################')
66
- puts("# Run `sudo gem cleanup` from time to time to speed up fastlane")
66
+ puts("# Run `gem cleanup` from time to time to speed up fastlane")
67
67
  end
68
68
  puts('#######################################################################')
69
69
  Changelog.show_changes(gem_name, current_version, update_gem_command: UpdateChecker.update_command(gem_name: gem_name)) unless FastlaneCore::Env.truthy?("FASTLANE_HIDE_CHANGELOG")
@@ -80,7 +80,7 @@ module FastlaneCore
80
80
  elsif Helper.mac_app?
81
81
  "the Fabric app. Launch the app and navigate to the fastlane tab to get the most recent version."
82
82
  else
83
- "sudo gem install #{gem_name.downcase}"
83
+ "gem install #{gem_name.downcase}"
84
84
  end
85
85
  end
86
86
 
Binary file
@@ -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)
@@ -149,7 +149,7 @@ module Match
149
149
  end
150
150
 
151
151
  def api_token(params)
152
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
152
+ @api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
153
153
  @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
154
154
  return @api_token
155
155
  end
@@ -91,7 +91,7 @@ module Match
91
91
  end
92
92
 
93
93
  def api_token(params)
94
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
94
+ @api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
95
95
  @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
96
96
  return @api_token
97
97
  end
@@ -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"
@@ -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,
@@ -116,7 +121,7 @@ module Match
116
121
  end
117
122
 
118
123
  def api_token
119
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
124
+ @api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
120
125
  @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
121
126
  return @api_token
122
127
  end
@@ -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,
@@ -139,7 +139,7 @@ module Match
139
139
  # rubocop:enable Metrics/PerceivedComplexity
140
140
 
141
141
  def api_token(params)
142
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
142
+ @api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
143
143
  @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
144
144
  return @api_token
145
145
  end
@@ -123,7 +123,7 @@ module Match
123
123
  end
124
124
 
125
125
  def api_token
126
- api_token ||= Spaceship::ConnectAPI::Token.create(self.api_key) if self.api_key
126
+ api_token ||= Spaceship::ConnectAPI::Token.create(**self.api_key) if self.api_key
127
127
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(self.api_key_path) if self.api_key_path
128
128
  return api_token
129
129
  end
@@ -196,7 +196,7 @@ module Match
196
196
  end
197
197
 
198
198
  def api_token
199
- api_token ||= Spaceship::ConnectAPI::Token.create(self.api_key) if self.api_key
199
+ api_token ||= Spaceship::ConnectAPI::Token.create(**self.api_key) if self.api_key
200
200
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(self.api_key_path) if self.api_key_path
201
201
  return api_token
202
202
  end
@@ -31,10 +31,11 @@ module Pilot
31
31
  platform: platform)
32
32
 
33
33
  transporter = transporter_for_selected_team(options)
34
- result = transporter.upload(fetch_app_id, package_path)
34
+ result = transporter.upload(package_path: package_path)
35
35
 
36
36
  unless result
37
- UI.user_error!("Error uploading ipa file, for more information see above")
37
+ transporter_errors = transporter.displayable_errors
38
+ UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
38
39
  end
39
40
 
40
41
  UI.success("Successfully uploaded the new binary to App Store Connect")
@@ -90,8 +91,13 @@ module Pilot
90
91
 
91
92
  def wait_for_build_processing_to_be_complete(return_when_build_appears = false)
92
93
  platform = fetch_app_platform
93
- app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
94
- app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
94
+ if config[:ipa]
95
+ app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
96
+ app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
97
+ else
98
+ app_version = config[:app_version]
99
+ app_build = config[:build_number]
100
+ end
95
101
 
96
102
  latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(
97
103
  app_id: app.id,
@@ -248,9 +254,13 @@ module Pilot
248
254
  end
249
255
  end
250
256
 
251
- update_build_beta_details(build, {
252
- auto_notify_enabled: options[:notify_external_testers]
253
- })
257
+ if options[:notify_external_testers].nil?
258
+ UI.important("Using App Store Connect's default for notifying external testers (which is true) - set `notify_external_testers` for full control")
259
+ else
260
+ update_build_beta_details(build, {
261
+ auto_notify_enabled: options[:notify_external_testers]
262
+ })
263
+ end
254
264
  end
255
265
 
256
266
  def self.truncate_changelog(changelog)
@@ -423,7 +433,14 @@ module Pilot
423
433
 
424
434
  UI.important("Export compliance has been set to '#{uses_non_exempt_encryption}'. Need to wait for build to finishing processing again...")
425
435
  UI.important("Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission")
426
- return wait_for_build_processing_to_be_complete
436
+
437
+ loop do
438
+ build = Spaceship::ConnectAPI::Build.get(build_id: uploaded_build.id)
439
+ return build unless build.missing_export_compliance?
440
+
441
+ UI.message("Waiting for build #{uploaded_build.id} to process export compliance")
442
+ sleep(5)
443
+ end
427
444
  else
428
445
  return uploaded_build
429
446
  end
@@ -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")
@@ -30,7 +34,7 @@ module Pilot
30
34
  end
31
35
 
32
36
  def api_token
33
- @api_token ||= Spaceship::ConnectAPI::Token.create(config[:api_key]) if config[:api_key]
37
+ @api_token ||= Spaceship::ConnectAPI::Token.create(**config[:api_key]) if config[:api_key]
34
38
  @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(config[:api_key_path]) if config[:api_key_path]
35
39
  return @api_token
36
40
  end