fastlane 2.241.1 → 2.242.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -39
  3. data/cert/lib/cert/runner.rb +1 -1
  4. data/credentials_manager/README.md +3 -3
  5. data/credentials_manager/lib/credentials_manager/account_manager.rb +13 -3
  6. data/deliver/lib/deliver/runner.rb +5 -0
  7. data/fastlane/lib/assets/certificates/AppleIncRootCertificate.cer +0 -0
  8. data/fastlane/lib/assets/certificates/AppleRootCA-G3.cer +0 -0
  9. data/fastlane/lib/fastlane/action.rb +8 -6
  10. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
  11. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +0 -3
  12. data/fastlane/lib/fastlane/actions/clipboard.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +0 -1
  14. data/fastlane/lib/fastlane/actions/create_keychain.rb +20 -29
  15. data/fastlane/lib/fastlane/actions/delete_keychain.rb +5 -3
  16. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -1
  18. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +4 -4
  19. data/fastlane/lib/fastlane/actions/docs/get_provisioning_profile.md +1 -1
  20. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +12 -0
  22. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +5 -4
  23. data/fastlane/lib/fastlane/actions/download_dsyms.rb +3 -1
  24. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
  25. data/fastlane/lib/fastlane/actions/git_pull.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +0 -1
  27. data/fastlane/lib/fastlane/actions/import_certificate.rb +18 -6
  28. data/fastlane/lib/fastlane/actions/import_from_gem.rb +70 -0
  29. data/fastlane/lib/fastlane/actions/jazzy.rb +1 -1
  30. data/fastlane/lib/fastlane/actions/lcov.rb +1 -1
  31. data/fastlane/lib/fastlane/actions/mailgun.rb +2 -2
  32. data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
  33. data/fastlane/lib/fastlane/actions/notarize.rb +55 -7
  34. data/fastlane/lib/fastlane/actions/prompt.rb +1 -1
  35. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +2 -2
  36. data/fastlane/lib/fastlane/actions/sh.rb +20 -2
  37. data/fastlane/lib/fastlane/actions/sourcedocs.rb +2 -2
  38. data/fastlane/lib/fastlane/actions/swiftlint.rb +5 -2
  39. data/fastlane/lib/fastlane/actions/unlock_keychain.rb +17 -29
  40. data/fastlane/lib/fastlane/actions/update_fastlane.rb +10 -3
  41. data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +2 -1
  42. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +21 -18
  43. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +1 -1
  44. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -2
  45. data/fastlane/lib/fastlane/actions/verify_build.rb +2 -1
  46. data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +2 -1
  47. data/fastlane/lib/fastlane/actions/xcodebuild.rb +1 -1
  48. data/fastlane/lib/fastlane/cli_tools_distributor.rb +7 -0
  49. data/fastlane/lib/fastlane/commands_generator.rb +7 -1
  50. data/fastlane/lib/fastlane/environment_printer.rb +14 -14
  51. data/fastlane/lib/fastlane/fast_file.rb +35 -4
  52. data/fastlane/lib/fastlane/helper/sh_helper.rb +27 -45
  53. data/fastlane/lib/fastlane/lane_list.rb +1 -1
  54. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -2
  55. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +0 -2
  56. data/fastlane/lib/fastlane/runner.rb +4 -6
  57. data/fastlane/lib/fastlane/server/socket_server.rb +57 -7
  58. data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +4 -4
  59. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -3
  60. data/fastlane/lib/fastlane/swift_lane_manager.rb +32 -11
  61. data/fastlane/lib/fastlane/version.rb +2 -1
  62. data/fastlane/swift/ArgumentProcessor.swift +10 -2
  63. data/fastlane/swift/Deliverfile.swift +1 -1
  64. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  65. data/fastlane/swift/Fastlane.swift +46 -152
  66. data/fastlane/swift/Gymfile.swift +1 -1
  67. data/fastlane/swift/GymfileProtocol.swift +1 -1
  68. data/fastlane/swift/MainProcess.swift +27 -0
  69. data/fastlane/swift/Matchfile.swift +1 -1
  70. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  71. data/fastlane/swift/Precheckfile.swift +1 -1
  72. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  73. data/fastlane/swift/RubyCommand.swift +1 -9
  74. data/fastlane/swift/RubyCommandable.swift +3 -2
  75. data/fastlane/swift/Runner.swift +1 -1
  76. data/fastlane/swift/Scanfile.swift +1 -1
  77. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  78. data/fastlane/swift/Screengrabfile.swift +1 -1
  79. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  80. data/fastlane/swift/Snapshotfile.swift +1 -1
  81. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  82. data/fastlane/swift/main.swift +1 -1
  83. data/fastlane_core/lib/fastlane_core/cert_checker.rb +40 -76
  84. data/fastlane_core/lib/fastlane_core/command_executor.rb +128 -7
  85. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -1
  86. data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +1 -1
  87. data/fastlane_core/lib/fastlane_core/device_manager.rb +14 -5
  88. data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +25 -10
  89. data/fastlane_core/lib/fastlane_core/helper.rb +26 -2
  90. data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +1 -1
  91. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +41 -22
  92. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +48 -71
  93. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -1
  94. data/fastlane_core/lib/fastlane_core/print_table.rb +1 -1
  95. data/fastlane_core/lib/fastlane_core/queue_worker.rb +0 -2
  96. data/fastlane_core/lib/fastlane_core/stored_passwords.rb +29 -0
  97. data/fastlane_core/lib/fastlane_core/string_filters.rb +1 -2
  98. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +8 -4
  99. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +2 -2
  100. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +1 -1
  101. data/frameit/lib/frameit/device_types.rb +11 -4
  102. data/frameit/lib/frameit/editor.rb +31 -12
  103. data/frameit/lib/frameit/frame_downloader.rb +4 -1
  104. data/gym/lib/gym/detect_values.rb +10 -10
  105. data/gym/lib/gym/options.rb +1 -7
  106. data/gym/lib/gym/runner.rb +6 -1
  107. data/match/lib/match/encryption/encryption.rb +6 -1
  108. data/match/lib/match/encryption/openssl.rb +8 -3
  109. data/match/lib/match/portal_fetcher.rb +12 -6
  110. data/match/lib/match/runner.rb +4 -1
  111. data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
  112. data/match/lib/match/storage/google_cloud_storage.rb +1 -1
  113. data/match/lib/match/storage/interface.rb +10 -0
  114. data/match/lib/match/storage/s3_storage.rb +1 -1
  115. data/pem/lib/pem/manager.rb +3 -3
  116. data/precheck/lib/precheck/runner.rb +4 -2
  117. data/scan/lib/scan/detect_values.rb +0 -1
  118. data/scan/lib/scan/runner.rb +1 -0
  119. data/sigh/lib/assets/resign.sh +10 -3
  120. data/sigh/lib/sigh/manager.rb +5 -1
  121. data/sigh/lib/sigh/resign.rb +5 -21
  122. data/snapshot/lib/snapshot/reset_simulators.rb +5 -2
  123. data/snapshot/lib/snapshot/runner.rb +0 -1
  124. data/spaceship/lib/spaceship/base.rb +1 -1
  125. data/spaceship/lib/spaceship/client.rb +13 -4
  126. data/spaceship/lib/spaceship/connect_api/api_client.rb +12 -14
  127. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
  128. data/spaceship/lib/spaceship/connect_api/models/user.rb +7 -3
  129. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +9 -11
  130. data/spaceship/lib/spaceship/connect_api/token.rb +21 -1
  131. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +3 -1
  132. data/spaceship/lib/spaceship/helper/plist_middleware.rb +2 -2
  133. data/spaceship/lib/spaceship/portal/portal_client.rb +8 -8
  134. data/spaceship/lib/spaceship/test_flight/client.rb +1 -5
  135. data/supply/lib/supply/client.rb +1 -1
  136. data/supply/lib/supply/options.rb +6 -0
  137. data/supply/lib/supply/uploader.rb +28 -2
  138. metadata +28 -25
  139. data/fastlane/lib/fastlane/actions/hockey.rb +0 -400
  140. data/fastlane/lib/fastlane/actions/typetalk.rb +0 -93
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41082316db6260b452820acb2f6254dd8666b30092363544b46f4bf7da8a372d
4
- data.tar.gz: 72020a428f0804273e1dbe44b2ae1dcac74b2eede448370932cbf63b94f3d5f4
3
+ metadata.gz: 952388dc8afb63d670ea825654830bf8bcfa5a113a1ad4f13efc7ebfd1ebca98
4
+ data.tar.gz: 0fe0555eaef2393b69f2de407c749237368c9c35ca0f733a3748d66adec7f529
5
5
  SHA512:
6
- metadata.gz: da0f67a4715290e286ef7faf42aa12b73ccc2c3de580f96807b22dda347411b0fb138c21284a91f18f983825555161bd6072556fb980d1c14976a8f76a3a1b8a
7
- data.tar.gz: c22918d93563fd3181c3f4cf3fa21c48873e16b0130ac8a5453145311943dd34b822e250e85ddcbcaccfc2b843934a355e562654ce2144cfdea6f56f67011b62
6
+ metadata.gz: 0706a5d45e34de51d57ab43b81d845915fc592546c4b2af160f9893896f120aefd065b28db2bbb6a859e337b9c31a2dcd3c9fcc0dd1a03863e86107efbce61ee
7
+ data.tar.gz: 9f0e45e91f8d4e2e5ddd089ec41c0743b532b13824aacf353ea36a3f5c3f2af8df127e5ba9d71250ddb3a768a5a841838c6938ed8c666f991a47454219c98800
data/README.md CHANGED
@@ -30,17 +30,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
30
30
  <!-- team:start -->
31
31
  <table id='team'>
32
32
  <tr>
33
- <td id='stefan-natchev'>
34
- <a href='https://github.com/snatchev'>
35
- <img src='https://github.com/snatchev.png?size=200' width='140'>
36
- </a>
37
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
38
- </td>
39
- <td id='jan-piotrowski'>
40
- <a href='https://github.com/janpio'>
41
- <img src='https://github.com/janpio.png?size=200' width='140'>
33
+ <td id='joshua-liebowitz'>
34
+ <a href='https://github.com/taquitos'>
35
+ <img src='https://github.com/taquitos.png?size=200' width='140'>
42
36
  </a>
43
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
37
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
44
38
  </td>
45
39
  <td id='connor-tumbleson'>
46
40
  <a href='https://github.com/ibotpeaches'>
@@ -48,11 +42,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
48
42
  </a>
49
43
  <h4 align='center'><a href='https://twitter.com/ibotpeaches'>Connor Tumbleson</a></h4>
50
44
  </td>
51
- <td id='felix-krause'>
52
- <a href='https://github.com/KrauseFx'>
53
- <img src='https://github.com/KrauseFx.png?size=200' width='140'>
45
+ <td id='jan-piotrowski'>
46
+ <a href='https://github.com/janpio'>
47
+ <img src='https://github.com/janpio.png?size=200' width='140'>
54
48
  </a>
55
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
49
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
56
50
  </td>
57
51
  <td id='jérôme-lacoste'>
58
52
  <a href='https://github.com/lacostej'>
@@ -60,19 +54,25 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
60
54
  </a>
61
55
  <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
62
56
  </td>
57
+ <td id='felix-krause'>
58
+ <a href='https://github.com/KrauseFx'>
59
+ <img src='https://github.com/KrauseFx.png?size=200' width='140'>
60
+ </a>
61
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
62
+ </td>
63
63
  </tr>
64
64
  <tr>
65
- <td id='roger-oba'>
66
- <a href='https://github.com/rogerluan'>
67
- <img src='https://github.com/rogerluan.png?size=200' width='140'>
65
+ <td id='stefan-natchev'>
66
+ <a href='https://github.com/snatchev'>
67
+ <img src='https://github.com/snatchev.png?size=200' width='140'>
68
68
  </a>
69
- <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
69
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
70
70
  </td>
71
- <td id='joshua-liebowitz'>
72
- <a href='https://github.com/taquitos'>
73
- <img src='https://github.com/taquitos.png?size=200' width='140'>
71
+ <td id='josh-holtz'>
72
+ <a href='https://github.com/joshdholtz'>
73
+ <img src='https://github.com/joshdholtz.png?size=200' width='140'>
74
74
  </a>
75
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
75
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
76
76
  </td>
77
77
  <td id='olivier-halligon'>
78
78
  <a href='https://github.com/AliSoftware'>
@@ -80,11 +80,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
80
80
  </a>
81
81
  <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
82
82
  </td>
83
- <td id='josh-holtz'>
84
- <a href='https://github.com/joshdholtz'>
85
- <img src='https://github.com/joshdholtz.png?size=200' width='140'>
83
+ <td id='roger-oba'>
84
+ <a href='https://github.com/rogerluan'>
85
+ <img src='https://github.com/rogerluan.png?size=200' width='140'>
86
86
  </a>
87
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
87
+ <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
88
88
  </td>
89
89
  </tr>
90
90
  </table>
@@ -94,24 +94,24 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
94
94
  _fastlane_ wouldn't be what it is today without the countless hours these former team members have dedicated to the project ❤️
95
95
 
96
96
  <p id='alumni'>
97
+ <a href='https://github.com/mollyIV'>Daniel Jankowski</a>,
98
+ <a href='https://github.com/matthewellis'>Matthew Ellis</a>,
99
+ <a href='https://github.com/revolter'>Iulian Onofrei</a>,
97
100
  <a href='https://github.com/lmirosevic'>Luka Mirosevic</a>,
98
- <a href='https://github.com/minuscorp'>Jorge Revuelta H</a>,
99
- <a href='https://github.com/milch'>Manu Wallner</a>,
100
101
  <a href='https://github.com/nafu'>Fumiya Nakamura</a>,
101
- <a href='https://github.com/revolter'>Iulian Onofrei</a>,
102
- <a href='https://github.com/ainame'>Satoshi Namai</a>,
103
- <a href='https://github.com/getaaron'>Aaron Brager</a>,
104
- <a href='https://github.com/hjanuschka'>Helmut Januschka</a>,
105
102
  <a href='https://github.com/max-ott'>Max Ott</a>,
106
- <a href='https://github.com/mollyIV'>Daniel Jankowski</a>,
107
- <a href='https://github.com/matthewellis'>Matthew Ellis</a>,
108
- <a href='https://github.com/mgrebenets'>Maksym Grebenets</a>,
109
- <a href='https://github.com/armcburney'>Andrew McBurney</a>,
110
- <a href='https://github.com/giginet'>Kohki Miki</a>,
103
+ <a href='https://github.com/jdee'>Jimmy Dee</a>,
111
104
  <a href='https://github.com/endocrimes'>Danielle Tomlinson</a>,
105
+ <a href='https://github.com/lucgrabowski'>Łukasz Grabowski</a>,
106
+ <a href='https://github.com/giginet'>Kohki Miki</a>,
107
+ <a href='https://github.com/getaaron'>Aaron Brager</a>,
108
+ <a href='https://github.com/milch'>Manu Wallner</a>,
112
109
  <a href='https://github.com/crazymanish'>Manish Rathi</a>,
113
- <a href='https://github.com/jdee'>Jimmy Dee</a>,
114
- <a href='https://github.com/lucgrabowski'>Łukasz Grabowski</a>
110
+ <a href='https://github.com/minuscorp'>Jorge Revuelta H</a>,
111
+ <a href='https://github.com/mgrebenets'>Maksym Grebenets</a>,
112
+ <a href='https://github.com/hjanuschka'>Helmut Januschka</a>,
113
+ <a href='https://github.com/armcburney'>Andrew McBurney</a>,
114
+ <a href='https://github.com/ainame'>Satoshi Namai</a>
115
115
  </p>
116
116
  <!-- team:end -->
117
117
 
@@ -223,7 +223,7 @@ module Cert
223
223
  File.write(request_path, csr.to_pem)
224
224
 
225
225
  private_key_path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.p12"))
226
- File.write(private_key_path, pkey)
226
+ FastlaneCore::Helper.open_owner_only(private_key_path) { |file| file.write(pkey) }
227
227
 
228
228
  cert_path = store_certificate(certificate, Cert.config[:filename])
229
229
 
@@ -23,9 +23,9 @@ password has been deleted.
23
23
 
24
24
  ## Storing in the keychain
25
25
 
26
- By default, your Apple credentials are stored in the macOS Keychain.
26
+ _fastlane_ only stores your Apple password in the macOS Keychain when the `FASTLANE_STORE_PASSWORDS_IN_KEYCHAIN` environment variable is set to `"1"`. Any program running as you can read a password stored this way, through the `security` command ([#29712](https://github.com/fastlane/fastlane/issues/29712)), so prefer an App Store Connect API key, or the `FASTLANE_PASSWORD` environment variable.
27
27
 
28
- Your password is only stored locally on your computer.
28
+ A password stored by an earlier version is still used, with a warning saying how to remove it.
29
29
 
30
30
  ## Change Password
31
31
 
@@ -40,7 +40,7 @@ FASTLANE_USER
40
40
  FASTLANE_PASSWORD
41
41
  ```
42
42
 
43
- If you don't want to have your password stored in the Keychain set the `FASTLANE_DONT_STORE_PASSWORD` environment variable to `"1"`.
43
+ `FASTLANE_DONT_STORE_PASSWORD` set to `"1"` still prevents storing, even when `FASTLANE_STORE_PASSWORDS_IN_KEYCHAIN` is set.
44
44
 
45
45
  ## Implementing a custom solution
46
46
 
@@ -1,5 +1,6 @@
1
1
  require 'security'
2
2
  require 'highline/import' # to hide the entered password
3
+ require 'fastlane_core/stored_passwords'
3
4
 
4
5
  require_relative 'appfile_config'
5
6
 
@@ -52,7 +53,10 @@ module CredentialsManager
52
53
  unless @password
53
54
  begin
54
55
  item = Security::InternetPassword.find(server: server_name)
55
- @password ||= item.password if item
56
+ if item
57
+ @password ||= item.password
58
+ warn_about_stored_password
59
+ end
56
60
  rescue Security::Error => ex
57
61
  puts("Could not read the Keychain entry for user '#{user}': #{ex.message}".yellow)
58
62
  end
@@ -111,11 +115,17 @@ module CredentialsManager
111
115
 
112
116
  private
113
117
 
118
+ def warn_about_stored_password
119
+ remove_with = default_prefix? ? "fastlane fastlane-credentials remove --username #{user}" : "security delete-internet-password -s #{server_name}"
120
+ instead = default_prefix? ? "provide it with the FASTLANE_PASSWORD environment variable" : "enter it when asked"
121
+ FastlaneCore::StoredPasswords.read_warning(server_name, what: "the password for #{user}", remove_with: remove_with, instead: instead)&.each { |line| puts(line.yellow) }
122
+ end
123
+
114
124
  def ask_for_login
115
125
  if ENV["FASTLANE_HIDE_LOGIN_INFORMATION"].to_s.length == 0
116
126
  puts("-------------------------------------------------------------------------------------".green)
117
127
  puts("Please provide your Apple Developer Program account credentials".green)
118
- puts("The login information you enter will be stored in your macOS Keychain".green) if mac?
128
+ puts("The login information you enter will be stored in your macOS Keychain".green) if mac? && FastlaneCore::StoredPasswords.store?
119
129
  if default_prefix?
120
130
  # We don't want to show this message, if we ask for the application specific password
121
131
  # which has a different prefix
@@ -141,7 +151,7 @@ module CredentialsManager
141
151
  @password = ask("Password (#{note}for #{@user}): ") { |q| q.echo = "*" }
142
152
  end
143
153
 
144
- return true if ENV["FASTLANE_DONT_STORE_PASSWORD"]
154
+ return true unless FastlaneCore::StoredPasswords.store?
145
155
  return true unless mac?
146
156
 
147
157
  # Now we store this information in the keychain
@@ -110,6 +110,11 @@ module Deliver
110
110
  precheck_success = true
111
111
  begin
112
112
  precheck_success = Precheck::Runner.new.run
113
+ rescue Precheck::Runner::BlockingViolationError => ex
114
+ UI.error(ex.message)
115
+ return false
116
+ rescue FastlaneCore::Interface::FastlaneError
117
+ raise
113
118
  rescue => ex
114
119
  UI.error("fastlane precheck just tried to inspect your app's metadata for App Store guideline violations and ran into a problem. We're not sure what the problem was, but precheck failed to finish. You can run it in verbose mode if you want to see the whole error. We'll have a fix out soon 🚀")
115
120
  UI.verbose(ex.inspect)
@@ -160,15 +160,17 @@ class String
160
160
  end
161
161
 
162
162
  def markdown_sample(is_first = false)
163
- self.markdown_clean_heredoc!
164
- self.markdown_details(is_first)
163
+ sample = self.dup
164
+ sample.markdown_clean_heredoc!
165
+ sample.markdown_details(is_first)
165
166
  end
166
167
 
167
168
  def markdown_list(is_first = false)
168
- self.markdown_clean_heredoc!
169
- self.gsub!(/^/, "- ") # add list dashes
170
- self.prepend(">") unless is_first # the empty line that will be added breaks the quote
171
- self.markdown_details(is_first)
169
+ list = self.dup
170
+ list.markdown_clean_heredoc!
171
+ list.gsub!(/^/, "- ") # add list dashes
172
+ list.prepend(">") unless is_first # the empty line that will be added breaks the quote
173
+ list.markdown_details(is_first)
172
174
  end
173
175
 
174
176
  def markdown_details(is_first)
@@ -71,7 +71,7 @@ module Fastlane
71
71
  description: "The content of the key p8 file",
72
72
  sensitive: true,
73
73
  optional: true,
74
- conflicting_options: [:filepath]),
74
+ conflicting_options: [:key_filepath]),
75
75
  FastlaneCore::ConfigItem.new(key: :is_key_content_base64,
76
76
  env_name: "APP_STORE_CONNECT_API_KEY_IS_KEY_CONTENT_BASE64",
77
77
  description: "Whether :key_content is Base64 encoded or not",
@@ -23,9 +23,6 @@ module Fastlane
23
23
  UI.success("Collecting Git commits between #{from} and #{to}")
24
24
  end
25
25
 
26
- # Normally it is not good practice to take arbitrary input and convert it to a symbol
27
- # because prior to Ruby 2.2, symbols are never garbage collected. However, we've
28
- # already validated that the input matches one of our allowed values, so this is OK
29
26
  merge_commit_filtering = params[:merge_commit_filtering].to_sym
30
27
 
31
28
  # We want to be specific and exclude nil for this comparison
@@ -37,7 +37,7 @@ module Fastlane
37
37
  def self.example_code
38
38
  [
39
39
  'clipboard(value: "https://docs.fastlane.tools/")',
40
- 'clipboard(value: lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] || "")'
40
+ 'clipboard(value: lane_context[SharedValues::SET_GITHUB_RELEASE_HTML_LINK] || "")'
41
41
  ]
42
42
  end
43
43
 
@@ -22,7 +22,6 @@ module Fastlane
22
22
  class CommitVersionBumpAction < Action
23
23
  def self.run(params)
24
24
  require 'xcodeproj'
25
- require 'set'
26
25
  require 'shellwords'
27
26
 
28
27
  xcodeproj_path = params[:xcodeproj] ? File.expand_path(File.join('.', params[:xcodeproj])) : nil
@@ -1,4 +1,4 @@
1
- require 'shellwords'
1
+ require 'security'
2
2
 
3
3
  module Fastlane
4
4
  module Actions
@@ -9,23 +9,19 @@ module Fastlane
9
9
 
10
10
  class CreateKeychainAction < Action
11
11
  def self.run(params)
12
- escaped_password = params[:password].shellescape
13
-
14
- if params[:name]
15
- escaped_name = params[:name].shellescape
16
- keychain_path = "~/Library/Keychains/#{escaped_name}"
17
- else
18
- keychain_path = params[:path].shellescape
19
- end
12
+ keychain_path = params[:name] ? "~/Library/Keychains/#{params[:name]}" : params[:path]
20
13
 
21
14
  if keychain_path.nil?
22
15
  UI.user_error!("You either have to set :name or :path")
23
16
  end
24
17
 
25
- commands = []
26
-
18
+ keychain = Security::Keychain.new(File.expand_path(keychain_path))
27
19
  if !exists?(keychain_path)
28
- commands << Fastlane::Actions.sh("security create-keychain -p #{escaped_password} #{keychain_path}", log: false)
20
+ begin
21
+ Security::Keychain.create(keychain.filename, params[:password])
22
+ rescue Security::Error => e
23
+ UI.user_error!("Could not create keychain '#{keychain_path}': #{e.message}")
24
+ end
29
25
  elsif params[:require_create]
30
26
  UI.abort_with_message!("`require_create` option passed, but found keychain '#{keychain_path}', failing create_keychain action")
31
27
  else
@@ -38,24 +34,22 @@ module Fastlane
38
34
  if params[:default_keychain]
39
35
  # if there is no default keychain - setting the original will fail - silent this error
40
36
  begin
41
- Actions.lane_context[Actions::SharedValues::ORIGINAL_DEFAULT_KEYCHAIN] = Fastlane::Actions.sh("security default-keychain", log: false).strip
42
- rescue
37
+ Actions.lane_context[Actions::SharedValues::ORIGINAL_DEFAULT_KEYCHAIN] = Security::Keychain.default_keychain&.filename
38
+ rescue Security::Error
43
39
  end
44
- commands << Fastlane::Actions.sh("security default-keychain -s #{keychain_path}", log: false)
40
+ UI.user_error!("Could not make '#{keychain_path}' the default keychain") unless Security::Keychain.set_default_keychain(keychain)
45
41
  end
46
42
 
47
- commands << Fastlane::Actions.sh("security unlock-keychain -p #{escaped_password} #{keychain_path}", log: false) if params[:unlock]
48
-
49
- command = "security set-keychain-settings"
43
+ if params[:unlock] && !keychain.unlock(params[:password])
44
+ UI.user_error!("Could not unlock keychain '#{keychain_path}'")
45
+ end
50
46
 
51
47
  # https://ss64.com/osx/security-keychain-settings.html
52
48
  # omitting 'timeout' option to specify "no timeout" if required
53
- command << " -t #{params[:timeout]}" if params[:timeout] > 0
54
- command << " -l" if params[:lock_when_sleeps]
55
- command << " -u" if params[:lock_after_timeout]
56
- command << " #{keychain_path}"
57
-
58
- commands << Fastlane::Actions.sh(command, log: false)
49
+ timeout = params[:timeout] if params[:timeout] > 0
50
+ unless keychain.update_settings(timeout: timeout, lock_when_sleeping: params[:lock_when_sleeps], lock_after_timeout: params[:lock_after_timeout])
51
+ UI.user_error!("Could not change the settings of keychain '#{keychain_path}'")
52
+ end
59
53
 
60
54
  if params[:add_to_search_list]
61
55
  keychains = list_keychains
@@ -63,16 +57,13 @@ module Fastlane
63
57
  if keychains.include?(expanded_path)
64
58
  UI.important("Found keychain '#{expanded_path}' in list-keychains, adding to search list skipped")
65
59
  else
66
- keychains << expanded_path
67
- commands << Fastlane::Actions.sh("security list-keychains -s #{keychains.shelljoin}", log: false)
60
+ UI.user_error!("Could not add '#{expanded_path}' to the keychain search list") unless Security::Keychain.set_search_list(keychains + [expanded_path])
68
61
  end
69
62
  end
70
-
71
- commands
72
63
  end
73
64
 
74
65
  def self.list_keychains
75
- Action.sh("security list-keychains -d user").shellsplit
66
+ Security::Keychain.list(:user).map(&:filename)
76
67
  end
77
68
 
78
69
  def self.exists?(keychain_path)
@@ -1,4 +1,4 @@
1
- require 'shellwords'
1
+ require 'security'
2
2
 
3
3
  module Fastlane
4
4
  module Actions
@@ -18,8 +18,10 @@ module Fastlane
18
18
  UI.user_error!("You either have to set :name or :keychain_path")
19
19
  end
20
20
 
21
- Fastlane::Actions.sh("security default-keychain -s #{original}", log: false) unless original.nil?
22
- Fastlane::Actions.sh("security delete-keychain #{keychain_path.shellescape}", log: false)
21
+ if original && !Security::Keychain.set_default_keychain(original)
22
+ UI.user_error!("Could not restore '#{original}' as the default keychain")
23
+ end
24
+ UI.user_error!("Could not delete keychain '#{keychain_path}'") unless Security::Keychain.new(keychain_path).delete
23
25
  end
24
26
 
25
27
  def self.details
@@ -194,7 +194,7 @@ end
194
194
  When _gym_ raises an error the `error_info` property will contain the process output
195
195
  in case you want to display the error in 3rd party tools such as Slack.
196
196
 
197
- You can then easily switch between the beta provider (e.g. `testflight`, `hockey`, `s3` and more).
197
+ You can then easily switch between the beta provider (e.g. `testflight`, `s3` and more).
198
198
 
199
199
  # How does it work?
200
200
 
@@ -25,7 +25,7 @@ _produce_ creates new iOS apps on both the Apple Developer Portal and App Store
25
25
  - **Associate** apps with iCloud Containers on the Apple Developer Portal
26
26
  - **Create** Merchant Identifiers on the Apple Developer Portal
27
27
  - **Associate** apps with Merchant Identifiers on the Apple Developer Portal
28
- - Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
28
+ - Support for **multiple Apple accounts**
29
29
 
30
30
  # Usage
31
31
 
@@ -60,7 +60,7 @@ Here is a nice gif, that shows _frameit_ in action:
60
60
  <h5 align="center">The <em>frameit</em> 2.0 update was kindly sponsored by <a href="https://mindnode.com/">MindNode</a>, seen in the screenshots above.</h5>
61
61
 
62
62
 
63
- The first time that _frameit_ is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](https://design.facebook.com/toolsandresources/devices/) and they are kept on [this repo](https://github.com/fastlane/frameit-frames).
63
+ The first time that _frameit_ is executed the frames will be downloaded automatically. The frames originally came from the [Facebook frameset](https://design.facebook.com/toolsandresources/devices/), newer devices come from [Apple Design Resources](https://developer.apple.com/design/resources/#product-bezels), and they are kept on [this repo](https://github.com/fastlane/frameit-frames).
64
64
 
65
65
  More information about this process and how to update the frames can be found [here](https://github.com/fastlane/fastlane/tree/master/frameit/frames_generator)
66
66
 
@@ -136,10 +136,10 @@ The general parameters are defined in the `default` key and can be:
136
136
  | `padding` | The content of the framed screenshot will be resized to match the specified `padding` around all edges. The vertical padding is also applied between the text and the top or bottom (depending on `title_below_image`) of the device frame. <p> There are 3 different options of specifying the padding: <p> 1. Default: An integer value that defines both horizontal and vertical padding in pixels. <br> 2. A string that defines (different) padding values in pixels for horizontal and vertical padding. The syntax is `"<horizontal>x<vertical>"`, e.g. `"30x60"`. <br> 3. A string that defines (different) padding values in percentage for horizontal and vertical padding. The syntax is `"<horizontal>%x<vertical>%"`, e.g. `"5%x10%"`. <br> **Note:** The percentage is calculated from the smallest image dimension (height or width). <p> A combination of option 2 and 3 is possible, e.g. `"5%x40"`. | `50` |
137
137
  | `interline_spacing` | Specifies whether _frameit_ should add or subtract this many pixels between the individual lines of text. This only applies to a multi-line `title` and/or `keyword` to expand or squash together the individual lines of text. | `0` |
138
138
  | `font_scale_factor` | Specifies whether _frameit_ should increase or decrease the font size of the text. Is ignored for `keyword` or `title`, if `font_size` is specified. | `0.1` |
139
- | `frame` | Overrides the color of the frame to be used. (Valid values are `BLACK`, `WHITE`, `GOLD` and `ROSE_GOLD`) | NA |
139
+ | `frame` | Overrides the color of the frame to be used, e.g. `BLACK`, `WHITE`, `SILVER`, `SPACE_GRAY` or `GRAPHITE`. The available colors for each device are in [frameit-frames](https://github.com/fastlane/frameit-frames/tree/gh-pages/latest), written in upper case with underscores (e.g. `Sierra Blue` is `SIERRA_BLUE`). If the device has no frame in that color, its default color is used. | NA |
140
140
  | `title_min_height` | Specifies a height always reserved for the title. Value can be a percentage of the height or an absolute value. The device will be placed below (or above) this area. Convenient to ensure the device top (or bottom) will be consistently placed at the same height on the different screenshots. | NA |
141
141
  | `use_platform` | Overrides the platform used for the screenshot. Valid values are `IOS`, `ANDROID` and `ANY`. | `IOS` |
142
- | `force_device_type` | Forces a specific device. Valid values are: Huawei P8, Motorola Moto E, Motorola Moto G, Nexus 4, Nexus 5X, Nexus 6P, Nexus 9, Samsung Galaxy Grand Prime, Samsung Galaxy Note 5, Samsung Galaxy S Duos, Samsung Galaxy S3, Samsung Galaxy S5, Samsung Galaxy S7, Samsung Galaxy S8, Samsung Galaxy S9, iPhone 5s, iPhone 5c, iPhone SE, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone 8, iPhone 8 Plus, iPhone X, iPhone XS, iPhone XR, iPhone XS Max, iPad Air 2, iPad Mini 4, iPad Pro, MacBook, Google Pixel 3, Google Pixel 3 XL, HTC One A9, HTC One M8 | NA |
142
+ | `force_device_type` | Forces a specific device. Valid values are: Google Pixel 3, Google Pixel 3 XL, Google Pixel 4, Google Pixel 4 XL, Google Pixel 5, HTC One A9, HTC One M8, Huawei P8, Motorola Moto E, Motorola Moto G, Nexus 4, Nexus 5X, Nexus 6P, Nexus 9, Samsung Galaxy Grand Prime, Samsung Galaxy Note 5, Samsung Galaxy Note 10, Samsung Galaxy Note 10+, Samsung Galaxy S Duos, Samsung Galaxy S3, Samsung Galaxy S5, Samsung Galaxy S7, Samsung Galaxy S8, Samsung Galaxy S9, Samsung Galaxy S10, Samsung Galaxy S10+, Xiaomi Mi Mix Alpha, Surface Pro X, iPhone 5s, iPhone 5c, iPhone SE, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone 8, iPhone 8 Plus, iPhone X, iPhone XS, iPhone XR, iPhone XS Max, iPhone 11, iPhone 11 Pro, iPhone 11 Pro Max, iPhone 12, iPhone 12 Pro, iPhone 12 Pro Max, iPhone 12 Mini, iPhone 13, iPhone 13 Pro, iPhone 13 Pro Max, iPhone 13 Mini, iPhone 14, iPhone 14 Plus, iPhone 14 Pro, iPhone 14 Pro Max, iPhone 16, iPhone 16 Plus, iPhone 16 Pro, iPhone 16 Pro Max, iPhone 17, iPhone 17 Pro, iPhone 17 Pro Max, iPad 10.2, iPad Air 2, iPad Air (2019), iPad Mini 4, iPad Mini (2019), iPad Pro, iPad Pro (12.9-inch) (3rd generation), iPad Pro (12.9-inch) (4th generation), iPad Pro (10.5-inch), iPad Pro (11-inch), MacBook | NA |
143
143
 
144
144
  ### Specific parameters
145
145
 
@@ -151,7 +151,7 @@ These are defined in the `data` key. This is an array with the following keys fo
151
151
  | `filter` | This is mandatory to link the individual configuration to the screenshot, based on part of the file name. <p>Example:<br>If a screenshot is named `iPhone 8-Brainstorming.png` you can use value `Brainstorming` for `filter`. If there are more than one `filter` matching an entry, they will all be applied in order (which means that the last one has the highest precedence). All other keys from that array element will only be applied on this specific screenshot. |
152
152
  | `keyword` | Similar use as in `default`, except that parameter `text` can be used here because it is screenshot specific. |
153
153
  | `title` | Similar use as in `default`, except that parameter `text` can be used here because it is screenshot specific. |
154
- | `frame` | Overrides the color of the frame to be used. (Valid values are `BLACK`, `WHITE`, `GOLD` and `ROSE_GOLD`) | NA |
154
+ | `frame` | Overrides the color of the frame to be used. Valid values are the same as for the general parameter. | NA |
155
155
  | `use_platform` | Overrides the platform used for the screenshot. Valid values are `IOS`, `ANDROID` and `ANY`. | `IOS` |
156
156
  | `force_device_type` | Forces a specific device. Valid values are the same as for the general parameter. | NA |
157
157
 
@@ -24,7 +24,7 @@ _sigh_ can create, renew, download and repair provisioning profiles (with one co
24
24
  - **Repair** a provisioning profile, when it is broken
25
25
  - **Create** a new provisioning profile, if it doesn't exist already
26
26
  - Supports **App Store**, **Ad Hoc** and **Development** profiles
27
- - Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
27
+ - Support for **multiple Apple accounts**
28
28
  - Support for **multiple Teams**
29
29
  - Support for **Enterprise Profiles**
30
30
 
@@ -513,7 +513,7 @@ A detailed description about how your credentials are handled is available in a
513
513
 
514
514
  ### How does this thing even work? Is magic involved? 🎩
515
515
 
516
- Your password will be stored in the macOS keychain, but can also be passed using environment variables. (More information available on [CredentialsManager](https://github.com/fastlane/fastlane/tree/master/credentials_manager))
516
+ Use an App Store Connect API key, or pass your password in the `FASTLANE_PASSWORD` environment variable. _fastlane_ stores it in the macOS keychain only when `FASTLANE_STORE_PASSWORDS_IN_KEYCHAIN` is set. (More information available on [CredentialsManager](https://github.com/fastlane/fastlane/tree/master/credentials_manager))
517
517
 
518
518
  Before actually uploading anything to iTunes, _deliver_ will generate a HTML summary of the collected data.
519
519
 
@@ -174,6 +174,18 @@ A common Play publishing scenario might involve uploading an APK version to a te
174
174
 
175
175
  This can be done using the `--track_promote_to` parameter. The `--track_promote_to` parameter works with the `--track` parameter to command the Play API to promote existing Play track APK version(s) (those active on the track identified by the `--track` param value) to a new track (`--track_promote_to` value).
176
176
 
177
+ ### Force a Track Promotion
178
+
179
+ The Play Developer API only returns the release that is currently serving each track. A version that has already been superseded by a newer one is missing from that response, so promoting it fails with `Track 'internal' doesn't have any releases`, even though the Play Console still offers it. See [fastlane/fastlane#18497](https://github.com/fastlane/fastlane/issues/18497) for more info.
180
+
181
+ The `--track_promote_force` parameter works around this by building the release out of the values you pass instead of looking it up in the source track. Both `--version_code` and `--version_name` are required with it:
182
+
183
+ ```no-highlight
184
+ fastlane supply --track internal --track_promote_to production --track_promote_force --version_code 42 --version_name "1.2.3"
185
+ ```
186
+
187
+ Because the release is no longer looked up, the version code is not checked against the source track - make sure it is a version that exists in the track you are promoting from.
188
+
177
189
  ## Retrieve Track Release Names & Version Codes
178
190
 
179
191
  Before performing a new APK upload you may want to check existing track version codes or release names, or you may simply want to provide an informational lane that displays the currently promoted version codes or release name for the production track. You can use the `google_play_track_version_codes` action to retrieve existing version codes for a package and track. You can use the `google_play_track_release_names` action to retrieve existing release names for a package and track.
@@ -76,7 +76,8 @@ module Fastlane
76
76
  default_value: user,
77
77
  default_value_dynamic: true),
78
78
  FastlaneCore::ConfigItem.new(key: :app_identifier,
79
- env_name: "UPLOAD_APP_PRIVACY_DETAILS_TO_APP_STORE_APP_IDENTIFIER",
79
+ env_name: "DOWNLOAD_APP_PRIVACY_DETAILS_FROM_APP_STORE_APP_IDENTIFIER",
80
+ env_names: ["UPLOAD_APP_PRIVACY_DETAILS_TO_APP_STORE_APP_IDENTIFIER"], # The upload action's name, kept for existing setups
80
81
  description: "The bundle identifier of your app",
81
82
  code_gen_sensitive: true,
82
83
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier),
@@ -99,9 +100,9 @@ module Fastlane
99
100
 
100
101
  # JSON paths
101
102
  FastlaneCore::ConfigItem.new(key: :output_json_path,
102
- env_name: "UPLOAD_APP_PRIVACY_DETAILS_TO_APP_STORE_OUTPUT_JSON_PATH",
103
- description: "Path to the app usage data JSON file generated by interactive questions",
104
- conflicting_options: [:skip_json_file_saving],
103
+ env_name: "DOWNLOAD_APP_PRIVACY_DETAILS_FROM_APP_STORE_OUTPUT_JSON_PATH",
104
+ env_names: ["UPLOAD_APP_PRIVACY_DETAILS_TO_APP_STORE_OUTPUT_JSON_PATH"], # The upload action's name, kept for existing setups
105
+ description: "Path to write the downloaded app usage data JSON file to",
105
106
  default_value: File.join(DEFAULT_PATH, DEFAULT_FILE_NAME))
106
107
  ]
107
108
  end
@@ -28,7 +28,9 @@ module Fastlane
28
28
  # Get App
29
29
  app = Spaceship::ConnectAPI::App.find(params[:app_identifier])
30
30
  unless app
31
- UI.user_error!("Could not find app with bundle identifier '#{params[:app_identifier]}' on account #{params[:username]}")
31
+ # None when logged in with an API key; do not ask for one
32
+ account = params.fetch(:username, ask: false)
33
+ UI.user_error!("Could not find app with bundle identifier '#{params[:app_identifier]}'#{" on account #{account}" if account}")
32
34
  end
33
35
 
34
36
  # Process options
@@ -3,6 +3,7 @@ module Fastlane
3
3
  class GetManagedPlayStorePublishingRightsAction < Action
4
4
  def self.run(params)
5
5
  unless params[:json_key] || params[:json_key_data]
6
+ UI.user_error!("Pass :json_key or :json_key_data") unless UI.interactive?
6
7
  UI.important("To not be asked about this value, you can specify it using 'json_key'")
7
8
  json_key_path = UI.input("The service account json file used to authenticate with Google: ")
8
9
  json_key_path = File.expand_path(json_key_path)
@@ -5,7 +5,7 @@ module Fastlane
5
5
  commands = []
6
6
 
7
7
  unless params[:only_tags]
8
- command = "git pull"
8
+ command = +"git pull"
9
9
  command << " --rebase" if params[:rebase]
10
10
  commands += ["#{command} &&"]
11
11
  end
@@ -5,7 +5,6 @@ module Fastlane
5
5
  def self.run(params)
6
6
  require 'xcodeproj'
7
7
  require 'pathname'
8
- require 'set'
9
8
  require 'shellwords'
10
9
 
11
10
  xcodeproj_path = params[:xcodeproj] ? File.expand_path(File.join('.', params[:xcodeproj])) : nil