fastlane 2.240.0 → 2.241.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -177
  3. data/bin/fastlane +4 -2
  4. data/credentials_manager/README.md +1 -1
  5. data/credentials_manager/lib/credentials_manager/account_manager.rb +6 -2
  6. data/deliver/lib/deliver/app_screenshot.rb +0 -4
  7. data/deliver/lib/deliver/commands_generator.rb +1 -1
  8. data/deliver/lib/deliver/detect_values.rb +3 -1
  9. data/deliver/lib/deliver/download_screenshots.rb +8 -1
  10. data/deliver/lib/deliver/sync_screenshots.rb +27 -28
  11. data/deliver/lib/deliver/upload_app_clip_default_experience_header_images.rb +3 -3
  12. data/deliver/lib/deliver/upload_metadata.rb +12 -16
  13. data/deliver/lib/deliver/upload_screenshots.rb +12 -14
  14. data/docs/README.md +25 -0
  15. data/fastlane/lib/assets/TeamTable.md.erb +28 -0
  16. data/fastlane/lib/fastlane/actions/appaloosa.rb +2 -1
  17. data/fastlane/lib/fastlane/actions/appium.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/apteligent.rb +8 -1
  19. data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +1 -1
  20. data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +3 -0
  21. data/fastlane/lib/fastlane/actions/danger.rb +5 -5
  22. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -2
  23. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -2
  24. data/fastlane/lib/fastlane/actions/docs/get_certificates.md +0 -2
  25. data/fastlane/lib/fastlane/actions/docs/get_push_certificate.md +1 -3
  26. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +13 -3
  27. data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +2 -2
  28. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
  29. data/fastlane/lib/fastlane/actions/github_api.rb +1 -2
  30. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
  31. data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -1
  32. data/fastlane/lib/fastlane/actions/increment_version_number.rb +1 -1
  33. data/fastlane/lib/fastlane/actions/install_xcode_plugin.rb +16 -6
  34. data/fastlane/lib/fastlane/actions/lcov.rb +9 -2
  35. data/fastlane/lib/fastlane/actions/nexus_upload.rb +16 -4
  36. data/fastlane/lib/fastlane/actions/notification.rb +3 -2
  37. data/fastlane/lib/fastlane/actions/oclint.rb +8 -8
  38. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -4
  39. data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
  40. data/fastlane/lib/fastlane/actions/say.rb +2 -4
  41. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
  42. data/fastlane/lib/fastlane/actions/sonar.rb +16 -16
  43. data/fastlane/lib/fastlane/actions/sourcedocs.rb +8 -8
  44. data/fastlane/lib/fastlane/actions/splunkmint.rb +8 -1
  45. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -1
  46. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -2
  47. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -2
  48. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -4
  49. data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +3 -1
  50. data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +20 -19
  51. data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -6
  52. data/fastlane/lib/fastlane/actions/zip.rb +2 -1
  53. data/fastlane/lib/fastlane/auto_complete.rb +1 -1
  54. data/fastlane/lib/fastlane/cli_tools_distributor.rb +14 -0
  55. data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +23 -0
  56. data/fastlane/lib/fastlane/environment_printer.rb +12 -25
  57. data/fastlane/lib/fastlane/fast_file.rb +2 -1
  58. data/fastlane/lib/fastlane/fastlane_require.rb +5 -1
  59. data/fastlane/lib/fastlane/helper/sh_helper.rb +16 -6
  60. data/fastlane/lib/fastlane/new_action.rb +1 -1
  61. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -1
  62. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -1
  63. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +36 -4
  64. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
  65. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
  66. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -7
  67. data/fastlane/lib/fastlane/swift_lane_manager.rb +22 -4
  68. data/fastlane/lib/fastlane/version.rb +3 -2
  69. data/fastlane/swift/Deliverfile.swift +1 -1
  70. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  71. data/fastlane/swift/Fastlane.swift +55 -9
  72. data/fastlane/swift/Gymfile.swift +1 -1
  73. data/fastlane/swift/GymfileProtocol.swift +1 -1
  74. data/fastlane/swift/MainProcess.swift +190 -20
  75. data/fastlane/swift/Matchfile.swift +1 -1
  76. data/fastlane/swift/MatchfileProtocol.swift +10 -3
  77. data/fastlane/swift/Precheckfile.swift +1 -1
  78. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  79. data/fastlane/swift/Scanfile.swift +1 -1
  80. data/fastlane/swift/ScanfileProtocol.swift +8 -1
  81. data/fastlane/swift/Screengrabfile.swift +1 -1
  82. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  83. data/fastlane/swift/Snapshotfile.swift +1 -1
  84. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  85. data/fastlane/swift/formatting/Rakefile +1 -0
  86. data/fastlane/swift/main.swift +4 -1
  87. data/fastlane_core/README.md +1 -1
  88. data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +1 -17
  89. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +23 -8
  90. data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -2
  91. data/fastlane_core/lib/fastlane_core/helper.rb +34 -5
  92. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +0 -14
  93. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +31 -28
  94. data/fastlane_core/lib/fastlane_core/languages.rb +0 -1
  95. data/fastlane_core/lib/fastlane_core/print_table.rb +5 -2
  96. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +10 -19
  97. data/fastlane_core/lib/fastlane_core/secrets.rb +77 -0
  98. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +3 -3
  99. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +1 -1
  100. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +2 -1
  101. data/fastlane_core/lib/fastlane_core.rb +1 -0
  102. data/frameit/lib/frameit/device.rb +1 -1
  103. data/frameit/lib/frameit/frame_downloader.rb +2 -0
  104. data/frameit/lib/frameit/runner.rb +3 -2
  105. data/frameit/lib/frameit/screenshot.rb +0 -1
  106. data/gym/lib/gym/generators/build_command_generator.rb +4 -4
  107. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +3 -3
  108. data/gym/lib/gym/runner.rb +1 -1
  109. data/internal/README.md +1 -1
  110. data/match/lib/match/encryption/openssl.rb +6 -2
  111. data/match/lib/match/generator.rb +1 -0
  112. data/match/lib/match/options.rb +13 -5
  113. data/match/lib/match/runner.rb +30 -3
  114. data/match/lib/match/storage/git_storage.rb +43 -7
  115. data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
  116. data/match/lib/match/storage/interface.rb +8 -5
  117. data/pem/lib/pem/module.rb +0 -4
  118. data/precheck/lib/precheck/rule_processor.rb +1 -0
  119. data/produce/lib/produce/developer_center.rb +49 -2
  120. data/produce/lib/produce/itunes_connect.rb +1 -1
  121. data/produce/lib/produce/module.rb +21 -0
  122. data/produce/lib/produce/options.rb +17 -0
  123. data/produce/lib/produce/service.rb +3 -5
  124. data/produce/lib/produce.rb +0 -1
  125. data/scan/lib/scan/options.rb +7 -0
  126. data/scan/lib/scan/runner.rb +1 -1
  127. data/scan/lib/scan/test_command_generator.rb +12 -9
  128. data/scan/lib/scan/test_result_parser.rb +1 -0
  129. data/scan/lib/scan/xcpretty_reporter_options_generator.rb +2 -2
  130. data/screengrab/lib/screengrab/page.html.erb +12 -7
  131. data/screengrab/lib/screengrab/reports_generator.rb +1 -1
  132. data/sigh/lib/assets/resign.sh +17 -0
  133. data/sigh/lib/sigh/local_manage.rb +1 -1
  134. data/sigh/lib/sigh/options.rb +5 -0
  135. data/sigh/lib/sigh/resign.rb +3 -3
  136. data/sigh/lib/sigh/runner.rb +6 -1
  137. data/snapshot/lib/snapshot/page.html.erb +17 -12
  138. data/snapshot/lib/snapshot/reports_generator.rb +1 -1
  139. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
  140. data/snapshot/lib/snapshot.rb +0 -2
  141. data/spaceship/README.md +2 -3
  142. data/spaceship/lib/spaceship/base.rb +3 -1
  143. data/spaceship/lib/spaceship/client.rb +65 -47
  144. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +13 -2
  145. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -0
  146. data/spaceship/lib/spaceship/connect_api/models/profile.rb +7 -5
  147. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +25 -0
  148. data/spaceship/lib/spaceship/du/upload_file.rb +1 -1
  149. data/spaceship/lib/spaceship/errors.rb +7 -1
  150. data/spaceship/lib/spaceship/globals.rb +2 -2
  151. data/spaceship/lib/spaceship/portal/merchant.rb +127 -2
  152. data/spaceship/lib/spaceship/portal/portal_client.rb +58 -0
  153. data/spaceship/lib/spaceship/portal/ui/select_team.rb +0 -2
  154. data/spaceship/lib/spaceship/portal/website_push.rb +8 -2
  155. data/spaceship/lib/spaceship/test_flight/client.rb +0 -22
  156. data/spaceship/lib/spaceship/test_flight.rb +0 -1
  157. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -0
  158. data/supply/lib/supply/options.rb +1 -0
  159. data/supply/lib/supply.rb +0 -1
  160. metadata +75 -43
  161. data/produce/lib/produce/available_default_languages.rb +0 -62
  162. data/snapshot/lib/snapshot/screenshot_flatten.rb +0 -20
  163. data/snapshot/lib/snapshot/screenshot_rotate.rb +0 -36
  164. data/spaceship/lib/spaceship/test_flight/app_test_info.rb +0 -40
  165. data/supply/lib/supply/apk_listing.rb +0 -14
  166. /data/fastlane/lib/assets/{custom_action_template.rb → custom_action_template.rb.template} +0 -0
@@ -0,0 +1,28 @@
1
+ <table id='team'>
2
+ <%- team.each_slice(5) do |row| -%>
3
+ <tr>
4
+ <%- row.each do |github_user, user| -%>
5
+ <td id='<%= ERB::Util.h(user['name'].downcase.tr(' ', '-')) %>'>
6
+ <a href='https://github.com/<%= github_user %>'>
7
+ <img src='https://github.com/<%= github_user %>.png?size=200' width='140'>
8
+ </a>
9
+ <%- if user['twitter'] -%>
10
+ <h4 align='center'><a href='https://twitter.com/<%= user['twitter'] %>'><%= ERB::Util.h(user['name']) %></a></h4>
11
+ <%- else -%>
12
+ <h4 align='center'><%= ERB::Util.h(user['name']) %></h4>
13
+ <%- end -%>
14
+ </td>
15
+ <%- end -%>
16
+ </tr>
17
+ <%- end -%>
18
+ </table>
19
+ <%- unless alumni.empty? -%>
20
+
21
+ ### _fastlane_ alumni
22
+
23
+ _fastlane_ wouldn't be what it is today without the countless hours these former team members have dedicated to the project ❤️
24
+
25
+ <p id='alumni'>
26
+ <%= alumni.map { |github_user, user| "<a href='https://github.com/#{github_user}'>#{ERB::Util.h(user['name'])}</a>" }.join(",\n") %>
27
+ </p>
28
+ <%- end -%>
@@ -33,7 +33,8 @@ module Fastlane
33
33
  path = json_res['path']
34
34
  uri = URI.parse(Base64.decode64(s3_sign))
35
35
  File.open(file, 'rb') do |f|
36
- http = Net::HTTP.new(uri.host)
36
+ http = Net::HTTP.new(uri.host, uri.port)
37
+ http.use_ssl = (uri.scheme == 'https')
37
38
  put = Net::HTTP::Put.new(uri.request_uri)
38
39
  put.body = f.read
39
40
  put['content-type'] = ''
@@ -37,7 +37,7 @@ module Fastlane
37
37
 
38
38
  def self.invoke_appium_server(params)
39
39
  appium = detect_appium(params)
40
- Process.spawn("#{appium} -a #{params[:host]} -p #{params[:port]}")
40
+ Process.spawn(appium, "-a", params[:host].to_s, "-p", params[:port].to_s)
41
41
  end
42
42
 
43
43
  def self.detect_appium(params)
@@ -99,7 +99,14 @@ module Fastlane
99
99
  end
100
100
 
101
101
  def self.category
102
- :beta
102
+ :deprecated
103
+ end
104
+
105
+ def self.deprecated_notes
106
+ [
107
+ "VMware stopped selling Apteligent to new customers on February 4, 2019, and announced moving its capabilities to VMware Workspace ONE Intelligence.",
108
+ "See [Apteligent moving to Workspace ONE Intelligence](https://vcdx181.com/2019/01/20/apteligent-moving-to-workspace-one-intelligence/)."
109
+ ].join("\n")
103
110
  end
104
111
  end
105
112
  end
@@ -4,7 +4,7 @@ module Fastlane
4
4
  module Actions
5
5
  class BuildAndUploadToAppetizeAction < Action
6
6
  def self.run(params)
7
- tmp_path = File.join(Dir.tmpdir, "fastlane_build")
7
+ tmp_path = Dir.mktmpdir("fastlane_build-")
8
8
 
9
9
  xcodebuild_configs = params[:xcodebuild]
10
10
  xcodebuild_configs[:sdk] = "iphonesimulator"
@@ -45,6 +45,9 @@ module Fastlane
45
45
  [
46
46
  "This action deletes the files that get created in your repo as a result of running the _gym_ and _sigh_ commands. It doesn't delete the `fastlane/report.xml` though, this is probably more suited for the .gitignore.",
47
47
  "",
48
+ "From _cert_ it only deletes the `.cer` file. The private key (`<certificate id>.p12`, despite its name an unencrypted PEM key) and the `.certSigningRequest` that _cert_ writes to its `output_path` when it creates a certificate are kept: " \
49
+ "_cert_ uses that `.p12` to install the certificate on a machine that doesn't have it, and on systems other than macOS it is the only copy of the key. Keep them out of version control.",
50
+ "",
48
51
  "Useful if you quickly want to send out a test build by dropping down to the command line and typing something like `fastlane beta`, without leaving your repo in a messy state afterwards."
49
52
  ].join("\n")
50
53
  end
@@ -14,15 +14,15 @@ module Fastlane
14
14
  base = params[:base]
15
15
  head = params[:head]
16
16
  pr = params[:pr]
17
- cmd << "--danger_id=#{danger_id}" if danger_id
18
- cmd << "--dangerfile=#{dangerfile}" if dangerfile
17
+ cmd << "--danger_id=#{danger_id.shellescape}" if danger_id
18
+ cmd << "--dangerfile=#{dangerfile.shellescape}" if dangerfile
19
19
  cmd << "--fail-on-errors=true" if params[:fail_on_errors]
20
20
  cmd << "--fail-if-no-pr=true" if params[:fail_if_no_pr]
21
21
  cmd << "--new-comment" if params[:new_comment]
22
22
  cmd << "--remove-previous-comments" if params[:remove_previous_comments]
23
- cmd << "--base=#{base}" if base
24
- cmd << "--head=#{head}" if head
25
- cmd << "pr #{pr}" if pr
23
+ cmd << "--base=#{base.shellescape}" if base
24
+ cmd << "--head=#{head.shellescape}" if head
25
+ cmd << "pr #{pr.shellescape}" if pr
26
26
 
27
27
  ENV['DANGER_GITHUB_API_TOKEN'] = params[:github_api_token] if params[:github_api_token]
28
28
  ENV['DANGER_GITHUB_HOST'] = params[:github_enterprise_host] if params[:github_enterprise_host]
@@ -6,8 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="#whats-gym">Features</a> &bull;
9
- <a href="#usage">Usage</a> &bull;
10
- <a href="#tips">Tips</a>
9
+ <a href="#usage">Usage</a>
11
10
  </p>
12
11
 
13
12
  -------
@@ -10,8 +10,7 @@ _produce_ creates new iOS apps on both the Apple Developer Portal and App Store
10
10
 
11
11
  <p align="center">
12
12
  <a href="#features">Features</a> &bull;
13
- <a href="#usage">Usage</a> &bull;
14
- <a href="#how-does-it-work">How does it work?</a>
13
+ <a href="#usage">Usage</a>
15
14
  </p>
16
15
 
17
16
  -------
@@ -4,9 +4,7 @@
4
4
 
5
5
  -------
6
6
  <p align="center">
7
- <a href="#why">Why?</a> &bull;
8
7
  <a href="#usage">Usage</a> &bull;
9
- <a href="#how-does-it-work">How does it work?</a> &bull;
10
8
  <a href="#tips">Tips</a>
11
9
  </p>
12
10
 
@@ -17,9 +17,7 @@ To automate iOS Provisioning profiles you can use [_match_](https://docs.fastlan
17
17
  <p align="center">
18
18
  <a href="#features">Features</a> &bull;
19
19
  <a href="#usage">Usage</a> &bull;
20
- <a href="#how-does-it-work">How does it work?</a> &bull;
21
- <a href="#tips">Tips</a> &bull;
22
- <a href="#need-help">Need help?</a>
20
+ <a href="#how-does-it-work">How does it work?</a>
23
21
  </p>
24
22
 
25
23
  -------
@@ -81,12 +81,15 @@ Use Git Storage to store all code signing identities in a private git repo, owne
81
81
 
82
82
  First, enter the URL to your private (!) Git repo (You can create one for free on e.g. [GitHub](https://github.com/new) or [BitBucket](https://bitbucket.org/repo/create)). The URL you enter can be either a `https://` or a `git` URL. `fastlane match init` won't read or modify your certificates or profiles yet, and also won't validate your git URL.
83
83
 
84
+ You'll then be asked which branch of that repo to use, defaulting to `main` if you leave the answer blank.
85
+
84
86
  This will create a `Matchfile` in your current directory (or in your `./fastlane/` folder).
85
87
 
86
88
  Example content (for more advanced setups check out the [fastlane section](#fastlane)):
87
89
 
88
90
  ```ruby-skip-tests
89
91
  git_url("https://github.com/fastlane/certificates")
92
+ git_branch("main")
90
93
 
91
94
  app_identifier("tools.fastlane.app")
92
95
  username("user@fastlane.tools")
@@ -94,7 +97,7 @@ username("user@fastlane.tools")
94
97
 
95
98
  ##### Git Storage on GitHub
96
99
 
97
- If your machine is currently using SSH to authenticate with GitHub, you'll want to use a `git` URL, otherwise, you may see an authentication error when you attempt to use match. Alternatively, you can set a basic authorization for _match_:
100
+ If your machine is currently using SSH to authenticate with GitHub, you'll want to use a `git` URL, otherwise, you may see an authentication error when you attempt to use match. Alternatively, you can set a basic authorization for _match_ (needs git 2.31 or later):
98
101
 
99
102
  Using parameter:
100
103
 
@@ -138,7 +141,7 @@ You can find more information about GitHub basic authentication and personal tok
138
141
 
139
142
  ##### Git Storage on Azure DevOps
140
143
 
141
- If you're running a pipeline on Azure DevOps and using git storage in a another repository on the same project, you might want to use `bearer` token authentication.
144
+ If you're running a pipeline on Azure DevOps and using git storage in a another repository on the same project, you might want to use `bearer` token authentication (needs git 2.31 or later).
142
145
 
143
146
  Using parameter:
144
147
 
@@ -259,7 +262,7 @@ If you want to use a single developer and/or distribution certificate for multip
259
262
 
260
263
  ```ruby-skip-tests
261
264
  git_url("https://github.com/example/example-repo.git")
262
- git_branch("master")
265
+ git_branch("main")
263
266
  ```
264
267
 
265
268
  _match_ will reuse certificates and will create separate provisioning profiles for each app.
@@ -408,6 +411,13 @@ If you're not using `Fastfile`, you can also use the `force_for_new_devices` opt
408
411
  fastlane match adhoc --force_for_new_devices
409
412
  ```
410
413
 
414
+ ##### Offline profile use
415
+
416
+ If your profile requires the 'Offline support (7 day validity)' setting for use without Internet, use `offline_profile: true` to add this permission to generated profiles.
417
+
418
+ > [!NOTE]
419
+ > Offline profiles can only be created when logging in with an Apple ID. Apple's App Store Connect API (`api_key` / `api_key_path`) does not support this setting, so _match_ will fail with a clear error if both are combined.
420
+
411
421
  ##### Managed capabilities
412
422
 
413
423
  > [!IMPORTANT]
@@ -2,7 +2,7 @@ module Fastlane
2
2
  module Actions
3
3
  class EnsureNoDebugCodeAction < Action
4
4
  def self.run(params)
5
- command = "grep -RE '#{params[:text]}' '#{File.absolute_path(params[:path])}'"
5
+ command = "grep -RE #{params[:text].shellescape} #{File.absolute_path(params[:path]).shellescape}"
6
6
 
7
7
  extensions = []
8
8
  extensions << params[:extension] unless params[:extension].nil?
@@ -20,7 +20,7 @@ module Fastlane
20
20
  command << " --include=\\*.#{extensions.join(',')}"
21
21
  end
22
22
 
23
- command << " --exclude #{params[:exclude]}" if params[:exclude]
23
+ command << " --exclude #{params[:exclude].shellescape}" if params[:exclude]
24
24
 
25
25
  if params[:exclude_dirs]
26
26
  params[:exclude_dirs].each do |dir|
@@ -92,6 +92,7 @@ module Fastlane
92
92
  conflicting_options: [:json_key],
93
93
  optional: true,
94
94
  description: "The raw service account JSON data used to authenticate with Google",
95
+ sensitive: true,
95
96
  code_gen_sensitive: true,
96
97
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_data_raw),
97
98
  default_value_dynamic: true,
@@ -250,12 +250,11 @@ module Fastlane
250
250
  def call_endpoint(url, http_method, headers, body, secure)
251
251
  require 'excon'
252
252
 
253
- Excon.defaults[:ssl_verify_peer] = secure
254
253
  middlewares = Excon.defaults[:middlewares] + [Excon::Middleware::RedirectFollower] # allow redirect in case of repo renames
255
254
 
256
255
  UI.verbose("#{http_method} : #{url}")
257
256
 
258
- connection = Excon.new(url)
257
+ connection = Excon.new(url, ssl_verify_peer: secure)
259
258
  connection.request(
260
259
  method: http_method,
261
260
  headers: headers,
@@ -92,7 +92,7 @@ module Fastlane
92
92
  end
93
93
 
94
94
  # create a commit with a message
95
- command = "hg commit -m '#{params[:message]}'"
95
+ command = "hg commit -m #{params[:message].shellescape}"
96
96
  return command if Helper.test?
97
97
  begin
98
98
  Actions.sh(command)
@@ -37,7 +37,7 @@ module Fastlane
37
37
  command = [
38
38
  command_prefix,
39
39
  'agvtool',
40
- params[:build_number] ? "new-version#{mode} #{params[:build_number].to_s.strip}" : "next-version#{mode}",
40
+ params[:build_number] ? "new-version#{mode} #{params[:build_number].to_s.strip.shellescape}" : "next-version#{mode}",
41
41
  command_suffix
42
42
  ].join(' ')
43
43
 
@@ -77,7 +77,7 @@ module Fastlane
77
77
 
78
78
  command = [
79
79
  command_prefix,
80
- "agvtool new-marketing-version #{next_version_number.to_s.strip}"
80
+ "agvtool new-marketing-version #{next_version_number.to_s.strip.shellescape}"
81
81
  ].join(' ')
82
82
 
83
83
  if Helper.test?
@@ -25,11 +25,14 @@ module Fastlane
25
25
  end
26
26
  end
27
27
 
28
- zip_path = File.join(Dir.tmpdir, 'plugin.zip')
29
- Action.sh("curl", "-L", "-s", "-o", zip_path, params[:url])
30
- plugins_path = "#{ENV['HOME']}/Library/Application Support/Developer/Shared/Xcode/Plug-ins"
31
- FileUtils.mkdir_p(plugins_path)
32
- Action.sh("unzip", "-qo", zip_path, "-d", plugins_path)
28
+ Dir.mktmpdir do |dir|
29
+ zip_path = File.join(dir, 'plugin.zip')
30
+ # -f fails on an HTTP error instead of saving the error page; --proto also applies to redirects
31
+ Action.sh("curl", "-f", "-L", "-s", "--proto", "=https", "-o", zip_path, params[:url])
32
+ plugins_path = "#{ENV['HOME']}/Library/Application Support/Developer/Shared/Xcode/Plug-ins"
33
+ FileUtils.mkdir_p(plugins_path)
34
+ Action.sh("unzip", "-qo", zip_path, "-d", plugins_path)
35
+ end
33
36
 
34
37
  UI.success("Plugin #{File.basename(params[:url], '.zip')} installed successfully")
35
38
  UI.message("Please restart Xcode to use the newly installed plugin")
@@ -85,7 +88,14 @@ module Fastlane
85
88
  end
86
89
 
87
90
  def self.category
88
- :misc
91
+ :deprecated
92
+ end
93
+
94
+ def self.deprecated_notes
95
+ [
96
+ "Since Xcode 8, which added runtime library validation and source editor extensions ([New Features in Xcode 8](https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Chapters/xcode_8_0.html)), Xcode only loads plugins once you re-sign it yourself, and Xcode 14 removed its plugin system.",
97
+ "A source editor extension ships inside a macOS app: install the app, then enable the extension in the Extensions section of System Settings."
98
+ ].join("\n")
89
99
  end
90
100
  end
91
101
  end
@@ -44,7 +44,7 @@ module Fastlane
44
44
  end
45
45
 
46
46
  def self.gen_cov(options)
47
- tmp_cov_file = File.join(Dir.tmpdir, "coverage.info")
47
+ tmp_cov_file = File.join(Dir.mktmpdir("lcov-"), "coverage.info")
48
48
  output_dir = options[:output_dir]
49
49
  derived_data_path = derived_data_dir(options)
50
50
 
@@ -93,7 +93,14 @@ module Fastlane
93
93
  end
94
94
 
95
95
  def self.category
96
- :testing
96
+ :deprecated
97
+ end
98
+
99
+ def self.deprecated_notes
100
+ [
101
+ "Xcode records coverage as LLVM `.profdata`, not the gcov `.gcda` files that `lcov --capture --directory` reads, and this action looks for them under `Build/Intermediates`, which Xcode now names `Build/Intermediates.noindex`.",
102
+ "Use `slather`, or `xcrun llvm-cov export -format=lcov` to produce an lcov file."
103
+ ].join("\n")
97
104
  end
98
105
  end
99
106
  end
@@ -9,9 +9,24 @@ module Fastlane
9
9
  command += ssl_options(params)
10
10
  command += proxy_options(params)
11
11
  command += upload_options(params)
12
+ command << "--config -"
12
13
  command << upload_url(params)
13
14
 
14
- Fastlane::Actions.sh(command.join(' '), log: params[:verbose])
15
+ Fastlane::Actions.sh(command.join(' '), log: params[:verbose], stdin: curl_config(params))
16
+ end
17
+
18
+ def self.curl_config(params)
19
+ config = "user = #{curl_config_string("#{params[:username]}:#{params[:password]}")}\n"
20
+ if params[:proxy_address] && params[:proxy_port] && params[:proxy_username] && params[:proxy_password]
21
+ config << "proxy-user = #{curl_config_string("#{params[:proxy_username]}:#{params[:proxy_password]}")}\n"
22
+ end
23
+ config
24
+ end
25
+
26
+ # Quotes a value for a curl config file, using the escapes listed under `-K, --config` in `man curl`.
27
+ def self.curl_config_string(value)
28
+ escapes = { "\\" => "\\\\", "\"" => "\\\"", "\t" => "\\t", "\n" => "\\n", "\r" => "\\r", "\v" => "\\v" }
29
+ "\"#{value.gsub(/[\\"\t\n\r\v]/, escapes)}\""
15
30
  end
16
31
 
17
32
  def self.upload_url(params)
@@ -61,8 +76,6 @@ module Fastlane
61
76
  options << "--upload-file #{file_path}"
62
77
  end
63
78
 
64
- options << "-u #{params[:username].shellescape}:#{params[:password].shellescape}"
65
-
66
79
  options
67
80
  end
68
81
 
@@ -79,7 +92,6 @@ module Fastlane
79
92
  options = []
80
93
  if params[:proxy_address] && params[:proxy_port] && params[:proxy_username] && params[:proxy_password]
81
94
  options << "-x #{params[:proxy_address].shellescape}:#{params[:proxy_port].shellescape}"
82
- options << "--proxy-user #{params[:proxy_username].shellescape}:#{params[:proxy_password].shellescape}"
83
95
  end
84
96
 
85
97
  options
@@ -43,10 +43,11 @@ module Fastlane
43
43
  description: "Bundle identifier of application to be opened when the notification is clicked",
44
44
  optional: true),
45
45
  FastlaneCore::ConfigItem.new(key: :app_icon,
46
- description: "The URL of an image to display instead of the application icon (Mavericks+ only)",
46
+ deprecated: true,
47
+ description: "The URL of an image to display instead of the application icon",
47
48
  optional: true),
48
49
  FastlaneCore::ConfigItem.new(key: :content_image,
49
- description: "The URL of an image to display attached to the notification (Mavericks+ only)",
50
+ description: "The local path of an image to display attached to the notification (Mavericks+)",
50
51
  optional: true),
51
52
  FastlaneCore::ConfigItem.new(key: :open,
52
53
  description: "URL of the resource to be opened when the notification is clicked",
@@ -37,16 +37,16 @@ module Fastlane
37
37
  exclude_regex = ensure_regex_is_not_string!(exclude_regex)
38
38
 
39
39
  files = JSON.parse(File.read(compile_commands)).map do |compile_command|
40
- file = compile_command['file']
40
+ # Paths taken from xcodebuild's output escape spaces with a backslash
41
+ file = compile_command['file'].gsub('\ ', ' ')
41
42
  File.exist?(file) ? file : File.join(compile_command['directory'], file)
42
43
  end
43
44
 
44
45
  files.uniq!
45
46
  files.select! do |file|
46
- file_ruby = file.gsub('\ ', ' ')
47
- File.exist?(file_ruby) and
48
- (!select_regex or file_ruby =~ select_regex) and
49
- (!exclude_regex or file_ruby !~ exclude_regex)
47
+ File.exist?(file) and
48
+ (!select_regex or file =~ select_regex) and
49
+ (!exclude_regex or file !~ exclude_regex)
50
50
  end
51
51
 
52
52
  command_prefix = [
@@ -58,7 +58,7 @@ module Fastlane
58
58
  report_type = params[:report_type]
59
59
  report_path = params[:report_path] ? params[:report_path] : 'oclint_report.' + report_type
60
60
 
61
- oclint_args = ["-report-type=#{report_type}", "-o=#{report_path}"]
61
+ oclint_args = ["-report-type=#{report_type}", "-o=#{report_path.shellescape}"]
62
62
 
63
63
  oclint_args << "-list-enabled-rules" if params[:list_enabled_rules]
64
64
 
@@ -85,9 +85,9 @@ module Fastlane
85
85
 
86
86
  command = [
87
87
  command_prefix,
88
- oclint_path,
88
+ oclint_path.shellescape,
89
89
  oclint_args,
90
- '"' + files.join('" "') + '"'
90
+ files.shelljoin
91
91
  ].join(' ')
92
92
 
93
93
  Actions.lane_context[SharedValues::FL_OCLINT_REPORT_PATH] = File.expand_path(report_path)
@@ -3,22 +3,27 @@ module Fastlane
3
3
  # Push local changes to the remote branch
4
4
  class PushToGitRemoteAction < Action
5
5
  def self.run(params)
6
- # Find the local git branch using HEAD or fallback to CI's ENV git branch if you're in detached HEAD state
6
+ # Find the current branch, or on a detached HEAD the branch CI names in its environment variables
7
7
  local_git_branch = Actions.git_branch_name_using_HEAD
8
- local_git_branch = Actions.git_branch unless local_git_branch && local_git_branch != "HEAD"
8
+ detached_head = local_git_branch == "HEAD"
9
+ local_git_branch = Actions.git_branch unless local_git_branch && !detached_head
9
10
 
10
11
  local_branch = params[:local_branch]
11
12
  local_branch ||= local_git_branch.gsub(%r{#{params[:remote]}\/}, '') if local_git_branch
12
13
  UI.user_error!('Failed to get the current branch.') unless local_branch
13
14
 
14
15
  remote_branch = params[:remote_branch] || local_branch
16
+ UI.user_error!("HEAD is detached and no branch name was found in the CI environment variables; pass remote_branch") if remote_branch == "HEAD"
17
+
18
+ # On a detached HEAD the branch name comes from CI, and its local branch does not have the commits made on HEAD
19
+ source = params[:local_branch] || (detached_head ? "HEAD" : local_branch)
15
20
 
16
21
  # construct our command as an array of components
17
22
  command = [
18
23
  'git',
19
24
  'push',
20
25
  params[:remote],
21
- "#{local_branch.shellescape}:#{remote_branch.shellescape}"
26
+ "#{source.shellescape}:#{remote_branch.shellescape}"
22
27
  ]
23
28
 
24
29
  # optionally add the tags component
@@ -37,7 +42,7 @@ module Fastlane
37
42
  command << '--set-upstream' if params[:set_upstream]
38
43
 
39
44
  # optionally add the --push_options components
40
- params[:push_options].each { |push_option| command << "--push-option=#{push_option}" } if params[:push_options]
45
+ params[:push_options].each { |push_option| command << "--push-option=#{push_option.shellescape}" } if params[:push_options]
41
46
 
42
47
  # execute our command
43
48
  return command.join(' ') if Helper.test?
@@ -4,7 +4,7 @@ module Fastlane
4
4
  module Actions
5
5
  class RegisterDeviceAction < Action
6
6
  def self.is_supported?(platform)
7
- platform == :ios
7
+ [:ios, :mac].include?(platform)
8
8
  end
9
9
 
10
10
  def self.run(params)
@@ -2,15 +2,13 @@ module Fastlane
2
2
  module Actions
3
3
  class SayAction < Action
4
4
  def self.run(params)
5
- text = params[:text]
6
- text = text.join(' ')
7
- text = text.tr("'", '"')
5
+ text = params[:text].join(' ')
8
6
 
9
7
  if params[:mute]
10
8
  UI.message(text)
11
9
  return text
12
10
  else
13
- Actions.sh("say '#{text}'")
11
+ Actions.sh('say', text)
14
12
  end
15
13
  end
16
14
 
@@ -8,9 +8,9 @@ module Fastlane
8
8
  cmd << ['bundle exec'] if params[:use_bundle_exec] && shell_out_should_use_bundle_exec?
9
9
  cmd << ['pod keys set']
10
10
 
11
- cmd << ["\"#{params[:key]}\""]
12
- cmd << ["\"#{params[:value]}\""]
13
- cmd << ["\"#{params[:project]}\""] if params[:project]
11
+ cmd << [params[:key].shellescape]
12
+ cmd << [params[:value].shellescape]
13
+ cmd << [params[:project].shellescape] if params[:project]
14
14
 
15
15
  Actions.sh(cmd.join(' '))
16
16
  end
@@ -11,22 +11,22 @@ module Fastlane
11
11
  ].join(' ')
12
12
 
13
13
  sonar_scanner_args = []
14
- sonar_scanner_args << "-Dproject.settings=\"#{params[:project_configuration_path]}\"" if params[:project_configuration_path]
15
- sonar_scanner_args << "-Dsonar.projectKey=\"#{params[:project_key]}\"" if params[:project_key]
16
- sonar_scanner_args << "-Dsonar.projectName=\"#{params[:project_name]}\"" if params[:project_name]
17
- sonar_scanner_args << "-Dsonar.projectVersion=\"#{params[:project_version]}\"" if params[:project_version]
18
- sonar_scanner_args << "-Dsonar.sources=\"#{params[:sources_path]}\"" if params[:sources_path]
19
- sonar_scanner_args << "-Dsonar.exclusions=\"#{params[:exclusions]}\"" if params[:exclusions]
20
- sonar_scanner_args << "-Dsonar.language=\"#{params[:project_language]}\"" if params[:project_language]
21
- sonar_scanner_args << "-Dsonar.sourceEncoding=\"#{params[:source_encoding]}\"" if params[:source_encoding]
22
- sonar_scanner_args << "-Dsonar.login=\"#{params[:sonar_login]}\"" if params[:sonar_login]
23
- sonar_scanner_args << "-Dsonar.token=\"#{params[:sonar_token]}\"" if params[:sonar_token]
24
- sonar_scanner_args << "-Dsonar.host.url=\"#{params[:sonar_url]}\"" if params[:sonar_url]
25
- sonar_scanner_args << "-Dsonar.organization=\"#{params[:sonar_organization]}\"" if params[:sonar_organization]
26
- sonar_scanner_args << "-Dsonar.branch.name=\"#{params[:branch_name]}\"" if params[:branch_name]
27
- sonar_scanner_args << "-Dsonar.pullrequest.branch=\"#{params[:pull_request_branch]}\"" if params[:pull_request_branch]
28
- sonar_scanner_args << "-Dsonar.pullrequest.base=\"#{params[:pull_request_base]}\"" if params[:pull_request_base]
29
- sonar_scanner_args << "-Dsonar.pullrequest.key=\"#{params[:pull_request_key]}\"" if params[:pull_request_key]
14
+ sonar_scanner_args << "-Dproject.settings=#{params[:project_configuration_path].shellescape}" if params[:project_configuration_path]
15
+ sonar_scanner_args << "-Dsonar.projectKey=#{params[:project_key].shellescape}" if params[:project_key]
16
+ sonar_scanner_args << "-Dsonar.projectName=#{params[:project_name].shellescape}" if params[:project_name]
17
+ sonar_scanner_args << "-Dsonar.projectVersion=#{params[:project_version].shellescape}" if params[:project_version]
18
+ sonar_scanner_args << "-Dsonar.sources=#{params[:sources_path].shellescape}" if params[:sources_path]
19
+ sonar_scanner_args << "-Dsonar.exclusions=#{params[:exclusions].shellescape}" if params[:exclusions]
20
+ sonar_scanner_args << "-Dsonar.language=#{params[:project_language].shellescape}" if params[:project_language]
21
+ sonar_scanner_args << "-Dsonar.sourceEncoding=#{params[:source_encoding].shellescape}" if params[:source_encoding]
22
+ sonar_scanner_args << "-Dsonar.login=#{params[:sonar_login].shellescape}" if params[:sonar_login]
23
+ sonar_scanner_args << "-Dsonar.token=#{params[:sonar_token].shellescape}" if params[:sonar_token]
24
+ sonar_scanner_args << "-Dsonar.host.url=#{params[:sonar_url].shellescape}" if params[:sonar_url]
25
+ sonar_scanner_args << "-Dsonar.organization=#{params[:sonar_organization].shellescape}" if params[:sonar_organization]
26
+ sonar_scanner_args << "-Dsonar.branch.name=#{params[:branch_name].shellescape}" if params[:branch_name]
27
+ sonar_scanner_args << "-Dsonar.pullrequest.branch=#{params[:pull_request_branch].shellescape}" if params[:pull_request_branch]
28
+ sonar_scanner_args << "-Dsonar.pullrequest.base=#{params[:pull_request_base].shellescape}" if params[:pull_request_base]
29
+ sonar_scanner_args << "-Dsonar.pullrequest.key=#{params[:pull_request_key].shellescape}" if params[:pull_request_key]
30
30
 
31
31
  sonar_scanner_args << params[:sonar_runner_args] if params[:sonar_runner_args]
32
32
 
@@ -6,20 +6,20 @@ module Fastlane
6
6
 
7
7
  command = "sourcedocs generate"
8
8
  command << " --all-modules" if params[:all_modules]
9
- command << " --spm-module #{params[:spm_module]}" unless params[:spm_module].nil?
10
- command << " --module-name #{params[:module_name]}" unless params[:module_name].nil?
11
- command << " --link-beginning #{params[:link_beginning]}" unless params[:link_beginning].nil?
12
- command << " --link-ending #{params[:link_ending]}" unless params[:link_ending].nil?
13
- command << " --output-folder #{params[:output_folder]}" unless params[:output_folder].nil?
14
- command << " --min-acl #{params[:min_acl]}" unless params[:min_acl].nil?
9
+ command << " --spm-module #{params[:spm_module].shellescape}" unless params[:spm_module].nil?
10
+ command << " --module-name #{params[:module_name].shellescape}" unless params[:module_name].nil?
11
+ command << " --link-beginning #{params[:link_beginning].shellescape}" unless params[:link_beginning].nil?
12
+ command << " --link-ending #{params[:link_ending].shellescape}" unless params[:link_ending].nil?
13
+ command << " --output-folder #{params[:output_folder].shellescape}" unless params[:output_folder].nil?
14
+ command << " --min-acl #{params[:min_acl].shellescape}" unless params[:min_acl].nil?
15
15
  command << " --module-name-path" if params[:module_name_path]
16
16
  command << " --clean" if params[:clean]
17
17
  command << " --collapsible" if params[:collapsible]
18
18
  command << " --table-of-contents" if params[:table_of_contents]
19
19
  command << " --reproducible-docs" if params[:reproducible]
20
20
  unless params[:scheme].nil?
21
- command << " -- -scheme #{params[:scheme]}"
22
- command << " -sdk #{params[:sdk_platform]}" unless params[:sdk_platform].nil?
21
+ command << " -- -scheme #{params[:scheme].shellescape}"
22
+ command << " -sdk #{params[:sdk_platform].shellescape}" unless params[:sdk_platform].nil?
23
23
  end
24
24
  Actions.sh(command)
25
25
  end
@@ -149,7 +149,14 @@ module Fastlane
149
149
  end
150
150
 
151
151
  def self.category
152
- :beta
152
+ :deprecated
153
+ end
154
+
155
+ def self.deprecated_notes
156
+ [
157
+ "Splunk MINT reached End of Life in December 2021 for all MINT products, including the SDK and its Web Service.",
158
+ "See [Splunk MINT SDK for iOS (EOL)](https://docs.splunk.com/Documentation/MintIOSSDK/latest/DevGuide/APIReference)."
159
+ ].join("\n")
153
160
  end
154
161
  end
155
162
  end