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
@@ -1,16 +1,10 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH CIRCLE_BRANCH).reject do |branch|
5
- # Removing because tests break on CircleCI
6
- Helper.test? && branch == "CIRCLE_BRANCH"
7
- end.freeze
8
- end
9
-
10
3
  class GitBranchAction < Action
11
4
  def self.run(params)
12
- env_name = SharedValues::GIT_BRANCH_ENV_VARS.find { |env_var| FastlaneCore::Env.truthy?(env_var) }
13
- ENV.fetch(env_name.to_s) { `git symbolic-ref HEAD --short 2>/dev/null`.strip }
5
+ branch = Actions.git_branch
6
+ return "" if branch == "HEAD" # Backwards compatibility with the original (and documented) implementation
7
+ branch
14
8
  end
15
9
 
16
10
  #####################################################
@@ -22,7 +16,7 @@ module Fastlane
22
16
  end
23
17
 
24
18
  def self.details
25
- "If no branch could be found, this action will return an empty string"
19
+ "If no branch could be found, this action will return an empty string. This is a wrapper for the internal action Actions.git_branch"
26
20
  end
27
21
 
28
22
  def self.available_options
@@ -37,7 +37,7 @@ module Fastlane
37
37
  def self.available_options
38
38
  [
39
39
  FastlaneCore::ConfigItem.new(key: :path,
40
- description: "The file you want to commit",
40
+ description: "The file(s) or directory(ies) you want to commit. You can pass an array of multiple file-paths or fileglobs \"*.txt\" to commit all matching files. The files already staged but not specified and untracked files won't be committed",
41
41
  is_string: false),
42
42
  FastlaneCore::ConfigItem.new(key: :message,
43
43
  description: "The commit message that should be used"),
@@ -45,6 +45,10 @@ module Fastlane
45
45
  "Boolean value whether the tag exists or not"
46
46
  end
47
47
 
48
+ def self.return_type
49
+ :bool
50
+ end
51
+
48
52
  def self.output
49
53
  [
50
54
  ]
@@ -143,8 +143,9 @@ module Fastlane
143
143
  default_value: {},
144
144
  optional: true),
145
145
  FastlaneCore::ConfigItem.new(key: :headers,
146
+ env_name: "FL_GITHUB_API_HEADERS",
146
147
  description: "Optional headers to apply",
147
- is_string: false,
148
+ type: Hash,
148
149
  default_value: {},
149
150
  optional: true),
150
151
  FastlaneCore::ConfigItem.new(key: :secure,
@@ -33,10 +33,11 @@ module Fastlane
33
33
  agv_disabled = !system([command_prefix, 'agvtool what-version', command_suffix].join(' '))
34
34
  raise "Apple Generic Versioning is not enabled." if agv_disabled && params[:build_number].nil?
35
35
 
36
+ mode = params[:skip_info_plist] ? '' : ' -all'
36
37
  command = [
37
38
  command_prefix,
38
39
  'agvtool',
39
- params[:build_number] ? "new-version -all #{params[:build_number].to_s.strip}" : 'next-version -all',
40
+ params[:build_number] ? "new-version#{mode} #{params[:build_number].to_s.strip}" : "next-version#{mode}",
40
41
  command_suffix
41
42
  ].join(' ')
42
43
 
@@ -66,6 +67,12 @@ module Fastlane
66
67
  description: "Change to a specific version. When you provide this parameter, Apple Generic Versioning does not have to be enabled",
67
68
  optional: true,
68
69
  is_string: false),
70
+ FastlaneCore::ConfigItem.new(key: :skip_info_plist,
71
+ env_name: "FL_BUILD_NUMBER_SKIP_INFO_PLIST",
72
+ description: "Don't update Info.plist files when updating the build version",
73
+ is_string: false,
74
+ type: Boolean,
75
+ default_value: false),
69
76
  FastlaneCore::ConfigItem.new(key: :xcodeproj,
70
77
  env_name: "FL_BUILD_NUMBER_PROJECT",
71
78
  description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
@@ -48,6 +48,10 @@ module Fastlane
48
48
  "The absolute path to the installed provisioning profile"
49
49
  end
50
50
 
51
+ def self.return_type
52
+ :string
53
+ end
54
+
51
55
  def self.example_code
52
56
  [
53
57
  'install_provisioning_profile(path: "profiles/profile.mobileprovision")'
@@ -5,6 +5,7 @@ module Fastlane
5
5
  Actions.verify_gem!('jazzy')
6
6
  command = "jazzy"
7
7
  command << " --config #{params[:config]}" if params[:config]
8
+ command << " --module-version #{params[:module_version]}" if params[:module_version]
8
9
  Actions.sh(command)
9
10
  end
10
11
 
@@ -24,6 +25,13 @@ module Fastlane
24
25
  description: 'Path to jazzy config file',
25
26
  is_string: true,
26
27
  optional: true
28
+ ),
29
+ FastlaneCore::ConfigItem.new(
30
+ key: :module_version,
31
+ env_name: 'FL_JAZZY_MODULE_VERSION',
32
+ description: 'Version string to use as part of the the default docs title and inside the docset',
33
+ is_string: true,
34
+ optional: true
27
35
  )
28
36
  ]
29
37
  end
@@ -44,7 +52,8 @@ module Fastlane
44
52
 
45
53
  def self.example_code
46
54
  [
47
- 'jazzy'
55
+ 'jazzy',
56
+ 'jazzy(config: ".jazzy.yaml", module_version: "2.1.37")'
48
57
  ]
49
58
  end
50
59
 
@@ -38,7 +38,7 @@ module Fastlane
38
38
 
39
39
  [
40
40
  FastlaneCore::ConfigItem.new(key: :api_key_path,
41
- env_name: "APPSTORE_BUILD_NUMBER_API_KEY_PATH",
41
+ env_names: ["APPSTORE_BUILD_NUMBER_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
42
42
  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)",
43
43
  optional: true,
44
44
  conflicting_options: [:api_key],
@@ -46,7 +46,7 @@ module Fastlane
46
46
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
47
47
  end),
48
48
  FastlaneCore::ConfigItem.new(key: :api_key,
49
- env_name: "APPSTORE_BUILD_NUMBER_API_KEY",
49
+ env_names: ["APPSTORE_BUILD_NUMBER_API_KEY", "APP_STORE_CONNECT_API_KEY"],
50
50
  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)",
51
51
  type: Hash,
52
52
  optional: true,
@@ -70,6 +70,7 @@ module Fastlane
70
70
  short_option: "-u",
71
71
  env_name: "ITUNESCONNECT_USER",
72
72
  description: "Your Apple ID Username",
73
+ optional: true,
73
74
  default_value: user,
74
75
  default_value_dynamic: true),
75
76
  FastlaneCore::ConfigItem.new(key: :version,
@@ -0,0 +1,59 @@
1
+ module Fastlane
2
+ module Actions
3
+ class MatchNukeAction < Action
4
+ def self.run(params)
5
+ require 'match'
6
+
7
+ params.load_configuration_file("Matchfile")
8
+ params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
9
+
10
+ cert_type = Match.cert_type_sym(params[:type])
11
+ UI.important("Going to revoke your '#{cert_type}' certificate type and provisioning profiles")
12
+
13
+ Match::Nuke.new.run(params, type: cert_type)
14
+ end
15
+
16
+ #####################################################
17
+ # @!group Documentation
18
+ #####################################################
19
+
20
+ def self.description
21
+ "Easily nuke your certificate and provisioning profiles (via _match_)"
22
+ end
23
+
24
+ def self.details
25
+ [
26
+ "Use the match_nuke action to revoke your certificates and provisioning profiles.",
27
+ "Don't worry, apps that are already available in the App Store / TestFlight will still work.",
28
+ "Builds distributed via Ad Hoc or Enterprise will be disabled after nuking your account, so you'll have to re-upload a new build.",
29
+ "After clearing your account you'll start from a clean state, and you can run match to generate your certificates and profiles again.",
30
+ "More information: https://docs.fastlane.tools/actions/match/"
31
+ ].join("\n")
32
+ end
33
+
34
+ def self.available_options
35
+ require 'match'
36
+ Match::Options.available_options
37
+ end
38
+
39
+ def self.is_supported?(platform)
40
+ [:ios, :mac].include?(platform)
41
+ end
42
+
43
+ def self.example_code
44
+ [
45
+ 'match_nuke(type: "development")', # See all other options https://github.com/fastlane/fastlane/blob/master/match/lib/match/module.rb#L23
46
+ 'match_nuke(type: "development", api_key: app_store_connect_api_key)'
47
+ ]
48
+ end
49
+
50
+ def self.authors
51
+ ["crazymanish"]
52
+ end
53
+
54
+ def self.category
55
+ :code_signing
56
+ end
57
+ end
58
+ end
59
+ end
@@ -36,7 +36,6 @@ module Fastlane
36
36
  params[:push_options].each { |push_option| command << "--push-option=#{push_option}" } if params[:push_options]
37
37
 
38
38
  # execute our command
39
- Actions.sh('pwd')
40
39
  return command.join(' ') if Helper.test?
41
40
 
42
41
  Actions.sh(command.join(' '))
@@ -39,7 +39,7 @@ module Fastlane
39
39
 
40
40
  def self.api_token(params)
41
41
  params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
42
- api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
42
+ api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
43
43
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
44
44
  return api_token
45
45
  end
@@ -69,7 +69,7 @@ module Fastlane
69
69
  env_name: "FL_REGISTER_DEVICE_UDID",
70
70
  description: "Provide the UDID of the device to register as"),
71
71
  FastlaneCore::ConfigItem.new(key: :api_key_path,
72
- env_name: "FL_REGISTER_DEVICE_API_KEY_PATH",
72
+ env_names: ["FL_REGISTER_DEVICE_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
73
73
  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)",
74
74
  optional: true,
75
75
  conflicting_options: [:api_key],
@@ -77,7 +77,7 @@ module Fastlane
77
77
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
78
78
  end),
79
79
  FastlaneCore::ConfigItem.new(key: :api_key,
80
- env_name: "FL_REGISTER_DEVICE_API_KEY",
80
+ env_names: ["FL_REGISTER_DEVICE_API_KEY", "APP_STORE_CONNECT_API_KEY"],
81
81
  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)",
82
82
  type: Hash,
83
83
  optional: true,
@@ -85,7 +85,7 @@ module Fastlane
85
85
 
86
86
  def self.api_token(params)
87
87
  params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
88
- api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
88
+ api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
89
89
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
90
90
  return api_token
91
91
  end
@@ -118,7 +118,7 @@ module Fastlane
118
118
  UI.user_error!("Could not find file '#{value}'") unless File.exist?(value)
119
119
  end),
120
120
  FastlaneCore::ConfigItem.new(key: :api_key_path,
121
- env_name: "FL_REGISTER_DEVICES_API_KEY_PATH",
121
+ env_names: ["FL_REGISTER_DEVICES_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
122
122
  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)",
123
123
  optional: true,
124
124
  conflicting_options: [:api_key],
@@ -126,7 +126,7 @@ module Fastlane
126
126
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
127
127
  end),
128
128
  FastlaneCore::ConfigItem.new(key: :api_key,
129
- env_name: "FL_REGISTER_DEVICES_API_KEY",
129
+ env_names: ["FL_REGISTER_DEVICES_API_KEY", "APP_STORE_CONNECT_API_KEY"],
130
130
  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)",
131
131
  type: Hash,
132
132
  optional: true,
@@ -5,7 +5,7 @@ module Fastlane
5
5
  path = params[:path]
6
6
  backup_path = "#{path}.back"
7
7
  UI.user_error!("Could not find file '#{backup_path}'") unless File.exist?(backup_path)
8
- FileUtils.cp(backup_path, path, { preserve: true })
8
+ FileUtils.cp(backup_path, path, preserve: true)
9
9
  FileUtils.rm(backup_path)
10
10
  UI.message("Successfully restored backup 📤")
11
11
  end
@@ -80,7 +80,7 @@ module Fastlane
80
80
 
81
81
  def self.api_token(params)
82
82
  params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
83
- api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
83
+ api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
84
84
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
85
85
  return api_token
86
86
  end
@@ -111,7 +111,7 @@ module Fastlane
111
111
 
112
112
  [
113
113
  FastlaneCore::ConfigItem.new(key: :api_key_path,
114
- env_name: "FL_SET_CHANGELOG_API_KEY_PATH",
114
+ env_names: ["FL_SET_CHANGELOG_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
115
115
  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)",
116
116
  optional: true,
117
117
  conflicting_options: [:api_key],
@@ -119,7 +119,7 @@ module Fastlane
119
119
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
120
120
  end),
121
121
  FastlaneCore::ConfigItem.new(key: :api_key,
122
- env_name: "FL_SET_CHANGELOG_API_KEY",
122
+ env_names: ["FL_SET_CHANGELOG_API_KEY", "APP_STORE_CONNECT_API_KEY"],
123
123
  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)",
124
124
  type: Hash,
125
125
  optional: true,
@@ -124,7 +124,7 @@ module Fastlane
124
124
  end
125
125
 
126
126
  def self.return_type
127
- :array
127
+ :array_of_strings
128
128
  end
129
129
 
130
130
  def self.author
@@ -145,7 +145,7 @@ module Fastlane
145
145
  optional: true,
146
146
  verify_block: proc do |value|
147
147
  available = ['xcode', 'json', 'csv', 'checkstyle', 'codeclimate', 'junit', 'html', 'emoji', 'sonarqube', 'markdown', 'github-actions-logging']
148
- UI.warning("Known 'reporter' values are '#{available.join("', '")}'. If you're receiving errors from swiftlint related to the reporter, make sure the reporter identifier you're using is correct and it's supported by your version of swiftlint.") unless available.include?(value)
148
+ UI.important("Known 'reporter' values are '#{available.join("', '")}'. If you're receiving errors from swiftlint related to the reporter, make sure the reporter identifier you're using is correct and it's supported by your version of swiftlint.") unless available.include?(value)
149
149
  end),
150
150
  FastlaneCore::ConfigItem.new(key: :quiet,
151
151
  env_name: "FL_SWIFTLINT_QUIET",
@@ -140,7 +140,7 @@ module Fastlane
140
140
  env_name: "FL_PROJECT_SIGNING_BUILD_CONFIGURATIONS",
141
141
  optional: true,
142
142
  type: Array,
143
- description: "Specify build_configurations you want to toggle the signing mech. (default to all targets)",
143
+ description: "Specify build_configurations you want to toggle the signing mech. (default to all configurations)",
144
144
  is_string: false),
145
145
  FastlaneCore::ConfigItem.new(key: :code_sign_identity,
146
146
  env_name: "FL_CODE_SIGN_IDENTITY",
@@ -21,9 +21,8 @@ module Fastlane
21
21
  # download certificate
22
22
  unless File.exist?(params[:certificate])
23
23
  UI.message("Downloading root certificate from (#{ROOT_CERTIFICATE_URL}) to path '#{params[:certificate]}'")
24
- require 'open-uri'
25
24
  File.open(params[:certificate], "w:ASCII-8BIT") do |file|
26
- file.write(open(ROOT_CERTIFICATE_URL, "rb").read)
25
+ file.write(FastlaneCore::Helper.open_uri(ROOT_CERTIFICATE_URL, "rb").read)
27
26
  end
28
27
  end
29
28
 
@@ -1,5 +1,3 @@
1
- require 'thread'
2
-
3
1
  module Fastlane
4
2
  module Actions
5
3
  class UploadSymbolsToCrashlyticsAction < Action
@@ -35,10 +33,11 @@ module Fastlane
35
33
  UI.message("Using #{max_worker_threads} threads for Crashlytics dSYM upload 🏎")
36
34
  end
37
35
 
38
- dsym_paths.each do |current_path|
39
- handle_dsym(params, current_path, max_worker_threads)
36
+ worker = FastlaneCore::QueueWorker.new(max_worker_threads) do |dsym_path|
37
+ handle_dsym(params, dsym_path, max_worker_threads)
40
38
  end
41
-
39
+ worker.batch_enqueue(dsym_paths)
40
+ worker.start
42
41
  UI.success("Successfully uploaded dSYM files to Crashlytics 💯")
43
42
  end
44
43
 
@@ -22,7 +22,11 @@ module Fastlane
22
22
  return values if Helper.test?
23
23
 
24
24
  if distribute_only
25
- Pilot::BuildManager.new.distribute(values) # we already have the finished config
25
+ build_manager = Pilot::BuildManager.new
26
+ build_manager.start(values, should_login: true)
27
+
28
+ build_manager.wait_for_build_processing_to_be_complete(false) unless values[:skip_waiting_for_build_processing]
29
+ build_manager.distribute(values) # we already have the finished config
26
30
  else
27
31
  Pilot::BuildManager.new.upload(values) # we already have the finished config
28
32
  end
@@ -135,7 +135,7 @@ module Fastlane
135
135
  if options
136
136
  puts(Terminal::Table.new(
137
137
  title: "#{name} Options".green,
138
- headings: ['Key', 'Description', 'Env Var', 'Default'],
138
+ headings: ['Key', 'Description', 'Env Var(s)', 'Default'],
139
139
  rows: FastlaneCore::PrintTable.transform_output(options)
140
140
  ))
141
141
  else
@@ -197,7 +197,7 @@ module Fastlane
197
197
  if options.kind_of?(Array)
198
198
  options.each do |current|
199
199
  if current.kind_of?(FastlaneCore::ConfigItem)
200
- rows << [current.key.to_s.yellow, current.deprecated ? current.description.red : current.description, current.env_name, current.help_default_value]
200
+ rows << [current.key.to_s.yellow, current.deprecated ? current.description.red : current.description, current.env_names.join(", "), current.help_default_value]
201
201
  elsif current.kind_of?(Array)
202
202
  # Legacy actions that don't use the new config manager
203
203
  UI.user_error!("Invalid number of elements in this row: #{current}. Must be 2 or 3") unless [2, 3].include?(current.count)
@@ -24,7 +24,13 @@ module Fastlane
24
24
  end
25
25
 
26
26
  def render(template)
27
- ERB.new(template, nil, @trim_mode).result(binding)
27
+ # From Ruby 2.6, ERB.new takes keyword arguments and positional ones are deprecated
28
+ # https://bugs.ruby-lang.org/issues/14256
29
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
30
+ ERB.new(template, trim_mode: @trim_mode).result(binding)
31
+ else
32
+ ERB.new(template, nil, @trim_mode).result(binding)
33
+ end
28
34
  end
29
35
  end
30
36
  end
@@ -201,13 +201,17 @@ module Fastlane
201
201
  # First accepts hash (or named keywords) like other actions
202
202
  # Otherwise uses sh method that doesn't have an interface like an action
203
203
  if args.count == 1 && args.first.kind_of?(Hash)
204
- hash = args.first
205
- command = hash.delete(:command)
204
+ options = args.first
205
+ command = options.delete(:command)
206
206
 
207
207
  raise ArgumentError, "sh requires :command keyword in argument" if command.nil?
208
-
209
- new_args = [*command, hash]
210
- FastFile.sh(*new_args, &b)
208
+ log = options[:log].nil? ? true : options[:log]
209
+ FastFile.sh(*command, step_name: options[:step_name], log: log, error_callback: options[:error_callback], &b)
210
+ elsif args.count != 1 && args.last.kind_of?(Hash)
211
+ new_args = args.dup
212
+ options = new_args.pop
213
+ log = options[:log].nil? ? true : options[:log]
214
+ FastFile.sh(*new_args, step_name: options[:step_name], log: log, error_callback: options[:error_callback], &b)
211
215
  else
212
216
  FastFile.sh(*args, &b)
213
217
  end