fastlane 2.183.0 → 2.185.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +98 -91
  3. data/cert/lib/cert/runner.rb +3 -7
  4. data/deliver/lib/deliver/commands_generator.rb +1 -1
  5. data/deliver/lib/deliver/detect_values.rb +5 -3
  6. data/deliver/lib/deliver/download_screenshots.rb +1 -1
  7. data/deliver/lib/deliver/html_generator.rb +2 -2
  8. data/deliver/lib/deliver/module.rb +6 -0
  9. data/deliver/lib/deliver/options.rb +36 -51
  10. data/deliver/lib/deliver/runner.rb +8 -11
  11. data/deliver/lib/deliver/setup.rb +1 -1
  12. data/deliver/lib/deliver/submit_for_review.rb +1 -1
  13. data/deliver/lib/deliver/upload_metadata.rb +20 -6
  14. data/deliver/lib/deliver/upload_price_tier.rb +1 -1
  15. data/deliver/lib/deliver/upload_screenshots.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/adb.rb +1 -4
  17. data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
  18. data/fastlane/lib/fastlane/actions/add_git_tag.rb +4 -4
  19. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +10 -15
  20. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +12 -2
  21. data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
  22. data/fastlane/lib/fastlane/actions/carthage.rb +1 -1
  23. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +5 -1
  24. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +35 -16
  25. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +10 -4
  26. data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
  27. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +5 -1
  28. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +5 -1
  29. data/fastlane/lib/fastlane/actions/register_device.rb +7 -10
  30. data/fastlane/lib/fastlane/actions/register_devices.rb +7 -10
  31. data/fastlane/lib/fastlane/actions/set_changelog.rb +7 -10
  32. data/fastlane/lib/fastlane/actions/swiftlint.rb +17 -15
  33. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +6 -1
  34. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -1
  35. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +2 -1
  36. data/fastlane/lib/fastlane/environment_printer.rb +1 -0
  37. data/fastlane/lib/fastlane/helper/git_helper.rb +12 -7
  38. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
  39. data/fastlane/lib/fastlane/swift_fastlane_function.rb +8 -5
  40. data/fastlane/lib/fastlane/version.rb +1 -1
  41. data/fastlane/swift/Deliverfile.swift +1 -1
  42. data/fastlane/swift/DeliverfileProtocol.swift +20 -20
  43. data/fastlane/swift/Fastlane.swift +3032 -2604
  44. data/fastlane/swift/Gymfile.swift +1 -1
  45. data/fastlane/swift/GymfileProtocol.swift +1 -1
  46. data/fastlane/swift/Matchfile.swift +1 -1
  47. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  48. data/fastlane/swift/OptionalConfigValue.swift +2 -32
  49. data/fastlane/swift/Precheckfile.swift +1 -1
  50. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  51. data/fastlane/swift/Scanfile.swift +1 -1
  52. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  53. data/fastlane/swift/Screengrabfile.swift +1 -1
  54. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  55. data/fastlane/swift/Snapshotfile.swift +1 -1
  56. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  57. data/fastlane/swift/formatting/Brewfile.lock.json +11 -11
  58. data/fastlane_core/lib/fastlane_core/build_watcher.rb +26 -3
  59. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +5 -0
  60. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +5 -3
  61. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +1 -1
  62. data/fastlane_core/lib/fastlane_core/helper.rb +12 -0
  63. data/match/lib/match/importer.rb +6 -10
  64. data/match/lib/match/migrate.rb +2 -3
  65. data/match/lib/match/nuke.rb +3 -7
  66. data/match/lib/match/options.rb +1 -0
  67. data/match/lib/match/runner.rb +2 -3
  68. data/match/lib/match/spaceship_ensure.rb +3 -0
  69. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  70. data/match/lib/match/storage/s3_storage.rb +2 -2
  71. data/pilot/lib/pilot/build_manager.rb +7 -1
  72. data/pilot/lib/pilot/manager.rb +3 -7
  73. data/pilot/lib/pilot/options.rb +10 -2
  74. data/precheck/lib/precheck/runner.rb +8 -7
  75. data/sigh/lib/assets/resign.sh +81 -61
  76. data/sigh/lib/sigh/download_all.rb +4 -8
  77. data/sigh/lib/sigh/runner.rb +4 -8
  78. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +36 -4
  79. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +10 -0
  80. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +2 -3
  81. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +3 -1
  82. data/spaceship/lib/spaceship/connect_api/models/build.rb +2 -0
  83. data/spaceship/lib/spaceship/connect_api/token.rb +6 -0
  84. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +4 -2
  85. data/supply/lib/supply/client.rb +2 -2
  86. data/supply/lib/supply/uploader.rb +2 -2
  87. metadata +20 -20
  88. data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6eb7cf4626f2d80b3e2e9d1babae5ed8518aba5ef23d4a73ba5360b8f8737c0
4
- data.tar.gz: 328282bf768094d61b5224a888acb68fbe5a6a56d47e33c39df22d11652ab8ae
3
+ metadata.gz: b6e7c985939b0ad640d941e70d29b2a64adcdfda30bd7af3300769433992ec1d
4
+ data.tar.gz: beea0dd643df12e2aee3a8878a1dc5798cc7a06b27dbbb18efdab8b02f4a935e
5
5
  SHA512:
6
- metadata.gz: 896193a32f695ef2553dbd729afaaf11b183ba31cdab590c3a8b2f02a99aa47c9ddb30c0332e26361a8cfd30460957e50b9b5a2347ab7dabcbb8eacc48dfdfba
7
- data.tar.gz: d741cff12645e1afd755f75102bffbde8374f92248ba15e30f7f33334226b2ac26d79c33cc0b3c1982d3850dc9c1c7f3814b74c75466bac4f6a2d05b8bf7c0fb
6
+ metadata.gz: 788d3eb2bc42521a3864c2d9e61dc3e2c85753930f1f0f960ac27bb314a536b03c41224e52aaedc53b92447d617bff4879a516cfbc02641f06646662f00195ca
7
+ data.tar.gz: 5fa2058d1ffc22640fb181ae5bb632ea17825efd0ca77a66e68129568b0ff46cfcbca22c150d55a759a470d291979247b46ed316b08968ffe61de3a0680e3c7f
data/README.md CHANGED
@@ -35,158 +35,165 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
35
35
  <!-- This table is regenerated and resorted on each release -->
36
36
  <table id='team'>
37
37
  <tr>
38
- <td id='joshua-liebowitz'>
39
- <a href='https://github.com/taquitos'>
40
- <img src='https://github.com/taquitos.png?size=140'>
41
- </a>
42
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
43
- </td>
44
- <td id='luka-mirosevic'>
45
- <a href='https://github.com/lmirosevic'>
46
- <img src='https://github.com/lmirosevic.png?size=140'>
47
- </a>
48
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
49
- </td>
50
- <td id='iulian-onofrei'>
51
- <a href='https://github.com/revolter'>
52
- <img src='https://github.com/revolter.png?size=140'>
53
- </a>
54
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
55
- </td>
56
- <td id='maksym-grebenets'>
57
- <a href='https://github.com/mgrebenets'>
58
- <img src='https://github.com/mgrebenets.png?size=140'>
38
+ <td id='kohki-miki'>
39
+ <a href='https://github.com/giginet'>
40
+ <img src='https://github.com/giginet.png' width='140px;'>
59
41
  </a>
60
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
42
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
61
43
  </td>
62
44
  <td id='jorge-revuelta-h'>
63
45
  <a href='https://github.com/minuscorp'>
64
- <img src='https://github.com/minuscorp.png?size=140'>
46
+ <img src='https://github.com/minuscorp.png' width='140px;'>
65
47
  </a>
66
48
  <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
67
49
  </td>
68
- </tr>
69
- <tr>
70
- <td id='danielle-tomlinson'>
71
- <a href='https://github.com/endocrimes'>
72
- <img src='https://github.com/endocrimes.png?size=140'>
50
+ <td id='max-ott'>
51
+ <a href='https://github.com/max-ott'>
52
+ <img src='https://github.com/max-ott.png' width='140px;'>
73
53
  </a>
74
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
54
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
75
55
  </td>
76
- <td id='josh-holtz'>
77
- <a href='https://github.com/joshdholtz'>
78
- <img src='https://github.com/joshdholtz.png?size=140'>
56
+ <td id='helmut-januschka'>
57
+ <a href='https://github.com/hjanuschka'>
58
+ <img src='https://github.com/hjanuschka.png' width='140px;'>
79
59
  </a>
80
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
60
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
81
61
  </td>
82
- <td id='jérôme-lacoste'>
83
- <a href='https://github.com/lacostej'>
84
- <img src='https://github.com/lacostej.png?size=140'>
62
+ <td id='manu-wallner'>
63
+ <a href='https://github.com/milch'>
64
+ <img src='https://github.com/milch.png' width='140px;'>
85
65
  </a>
86
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
66
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
87
67
  </td>
88
- <td id='max-ott'>
89
- <a href='https://github.com/max-ott'>
90
- <img src='https://github.com/max-ott.png?size=140'>
68
+ </tr>
69
+ <tr>
70
+ <td id='luka-mirosevic'>
71
+ <a href='https://github.com/lmirosevic'>
72
+ <img src='https://github.com/lmirosevic.png' width='140px;'>
91
73
  </a>
92
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
74
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
93
75
  </td>
94
- <td id='jimmy-dee'>
95
- <a href='https://github.com/jdee'>
96
- <img src='https://github.com/jdee.png?size=140'>
76
+ <td id='aaron-brager'>
77
+ <a href='https://github.com/getaaron'>
78
+ <img src='https://github.com/getaaron.png' width='140px;'>
97
79
  </a>
98
- <h4 align='center'>Jimmy Dee</h4>
80
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
99
81
  </td>
100
- </tr>
101
- <tr>
102
82
  <td id='felix-krause'>
103
83
  <a href='https://github.com/KrauseFx'>
104
- <img src='https://github.com/KrauseFx.png?size=140'>
84
+ <img src='https://github.com/KrauseFx.png' width='140px;'>
105
85
  </a>
106
86
  <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
107
87
  </td>
108
- <td id='satoshi-namai'>
109
- <a href='https://github.com/ainame'>
110
- <img src='https://github.com/ainame.png?size=140'>
88
+ <td id='roger-oba'>
89
+ <a href='https://github.com/rogerluan'>
90
+ <img src='https://github.com/rogerluan.png' width='140px;'>
111
91
  </a>
112
- <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
92
+ <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
113
93
  </td>
114
94
  <td id='stefan-natchev'>
115
95
  <a href='https://github.com/snatchev'>
116
- <img src='https://github.com/snatchev.png?size=140'>
96
+ <img src='https://github.com/snatchev.png' width='140px;'>
117
97
  </a>
118
98
  <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
119
99
  </td>
100
+ </tr>
101
+ <tr>
102
+ <td id='fumiya-nakamura'>
103
+ <a href='https://github.com/nafu'>
104
+ <img src='https://github.com/nafu.png' width='140px;'>
105
+ </a>
106
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
107
+ </td>
120
108
  <td id='matthew-ellis'>
121
109
  <a href='https://github.com/matthewellis'>
122
- <img src='https://github.com/matthewellis.png?size=140'>
110
+ <img src='https://github.com/matthewellis.png' width='140px;'>
123
111
  </a>
124
112
  <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
125
113
  </td>
126
- <td id='jan-piotrowski'>
127
- <a href='https://github.com/janpio'>
128
- <img src='https://github.com/janpio.png?size=140'>
114
+ <td id='andrew-mcburney'>
115
+ <a href='https://github.com/armcburney'>
116
+ <img src='https://github.com/armcburney.png' width='140px;'>
129
117
  </a>
130
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
118
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
119
+ </td>
120
+ <td id='daniel-jankowski'>
121
+ <a href='https://github.com/mollyIV'>
122
+ <img src='https://github.com/mollyIV.png' width='140px;'>
123
+ </a>
124
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
125
+ </td>
126
+ <td id='jimmy-dee'>
127
+ <a href='https://github.com/jdee'>
128
+ <img src='https://github.com/jdee.png' width='140px;'>
129
+ </a>
130
+ <h4 align='center'>Jimmy Dee</h4>
131
131
  </td>
132
132
  </tr>
133
133
  <tr>
134
- <td id='manu-wallner'>
135
- <a href='https://github.com/milch'>
136
- <img src='https://github.com/milch.png?size=140'>
134
+ <td id='iulian-onofrei'>
135
+ <a href='https://github.com/revolter'>
136
+ <img src='https://github.com/revolter.png' width='140px;'>
137
137
  </a>
138
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
138
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
139
139
  </td>
140
- <td id='daniel-jankowski'>
141
- <a href='https://github.com/mollyIV'>
142
- <img src='https://github.com/mollyIV.png?size=140'>
140
+ <td id='joshua-liebowitz'>
141
+ <a href='https://github.com/taquitos'>
142
+ <img src='https://github.com/taquitos.png' width='140px;'>
143
143
  </a>
144
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
144
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
145
145
  </td>
146
- <td id='fumiya-nakamura'>
147
- <a href='https://github.com/nafu'>
148
- <img src='https://github.com/nafu.png?size=140'>
146
+ <td id='jan-piotrowski'>
147
+ <a href='https://github.com/janpio'>
148
+ <img src='https://github.com/janpio.png' width='140px;'>
149
149
  </a>
150
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
150
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
151
151
  </td>
152
- <td id='aaron-brager'>
153
- <a href='https://github.com/getaaron'>
154
- <img src='https://github.com/getaaron.png?size=140'>
152
+ <td id='josh-holtz'>
153
+ <a href='https://github.com/joshdholtz'>
154
+ <img src='https://github.com/joshdholtz.png' width='140px;'>
155
155
  </a>
156
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
156
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
157
157
  </td>
158
- <td id='kohki-miki'>
159
- <a href='https://github.com/giginet'>
160
- <img src='https://github.com/giginet.png?size=140'>
158
+ <td id='satoshi-namai'>
159
+ <a href='https://github.com/ainame'>
160
+ <img src='https://github.com/ainame.png' width='140px;'>
161
161
  </a>
162
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
162
+ <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
163
163
  </td>
164
164
  </tr>
165
165
  <tr>
166
- <td id='helmut-januschka'>
167
- <a href='https://github.com/hjanuschka'>
168
- <img src='https://github.com/hjanuschka.png?size=140'>
166
+ <td id='danielle-tomlinson'>
167
+ <a href='https://github.com/endocrimes'>
168
+ <img src='https://github.com/endocrimes.png' width='140px;'>
169
169
  </a>
170
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
170
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
171
171
  </td>
172
- <td id='roger-oba'>
173
- <a href='https://github.com/rogerluan'>
174
- <img src='https://github.com/rogerluan.png?size=140'>
172
+ <td id='manish-rathi'>
173
+ <a href='https://github.com/crazymanish'>
174
+ <img src='https://github.com/crazymanish.png' width='140px;'>
175
175
  </a>
176
- <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
176
+ <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
177
177
  </td>
178
178
  <td id='olivier-halligon'>
179
179
  <a href='https://github.com/AliSoftware'>
180
- <img src='https://github.com/AliSoftware.png?size=140'>
180
+ <img src='https://github.com/AliSoftware.png' width='140px;'>
181
181
  </a>
182
182
  <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
183
183
  </td>
184
- <td id='andrew-mcburney'>
185
- <a href='https://github.com/armcburney'>
186
- <img src='https://github.com/armcburney.png?size=140'>
184
+ <td id='jérôme-lacoste'>
185
+ <a href='https://github.com/lacostej'>
186
+ <img src='https://github.com/lacostej.png' width='140px;'>
187
187
  </a>
188
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
188
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
189
+ </td>
190
+ <td id='maksym-grebenets'>
191
+ <a href='https://github.com/mgrebenets'>
192
+ <img src='https://github.com/mgrebenets.png' width='140px;'>
193
+ </a>
194
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
189
195
  </td>
196
+ </tr>
190
197
  </table>
191
198
 
192
199
  Special thanks to all [contributors](https://github.com/fastlane/fastlane/graphs/contributors) for extending and improving _fastlane_.
@@ -20,9 +20,11 @@ module Cert
20
20
  end
21
21
 
22
22
  def login
23
- if api_token
23
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: Cert.config[:api_key], filepath: Cert.config[:api_key_path]))
24
24
  UI.message("Creating authorization token for App Store Connect API")
25
25
  Spaceship::ConnectAPI.token = api_token
26
+ elsif !Spaceship::ConnectAPI.token.nil?
27
+ UI.message("Using existing authorization token for App Store Connect API")
26
28
  else
27
29
  # Username is now optional since addition of App Store Connect API Key
28
30
  # Force asking for username to prompt user if not already set
@@ -34,12 +36,6 @@ module Cert
34
36
  end
35
37
  end
36
38
 
37
- def api_token
38
- @api_token ||= Spaceship::ConnectAPI::Token.create(**Cert.config[:api_key]) if Cert.config[:api_key]
39
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(Cert.config[:api_key_path]) if Cert.config[:api_key_path]
40
- return @api_token
41
- end
42
-
43
39
  def run
44
40
  FileUtils.mkdir_p(Cert.config[:output_path])
45
41
 
@@ -168,7 +168,7 @@ module Deliver
168
168
  return 0 unless res
169
169
 
170
170
  require 'deliver/setup'
171
- app = options[:app]
171
+ app = Deliver.cache[:app]
172
172
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
173
173
  v = app.get_latest_app_store_version(platform: platform)
174
174
  if options[:app_version].to_s.length > 0
@@ -10,6 +10,8 @@ require_relative 'languages'
10
10
  module Deliver
11
11
  class DetectValues
12
12
  def run!(options, skip_params = {})
13
+ Deliver.cache = {}
14
+
13
15
  find_platform(options)
14
16
  find_app_identifier(options)
15
17
  find_app(options)
@@ -46,9 +48,9 @@ module Deliver
46
48
  app = Spaceship::ConnectAPI::App.get(app_id: app_id)
47
49
  end
48
50
 
49
- if app
50
- options[:app] = app
51
- else
51
+ Deliver.cache[:app] = app
52
+
53
+ unless app
52
54
  UI.user_error!("Could not find app with app identifier '#{options[:app_identifier]}' in your App Store Connect account (#{options[:username]} - Team: #{Spaceship::Tunes.client.team_id})")
53
55
  end
54
56
  end
@@ -13,7 +13,7 @@ module Deliver
13
13
  end
14
14
 
15
15
  def self.download(options, folder_path)
16
- app = options[:app]
16
+ app = Deliver.cache[:app]
17
17
 
18
18
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
19
19
  if options[:use_live_version]
@@ -50,12 +50,12 @@ module Deliver
50
50
  @export_path = export_path
51
51
 
52
52
  @app_name = (options[:name]['en-US'] || options[:name].values.first) if options[:name]
53
- @app_name ||= options[:app].name
53
+ @app_name ||= Deliver.cache[:app].name
54
54
 
55
55
  @languages = options[:description].keys if options[:description]
56
56
  @languages ||= begin
57
57
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
58
- version = options[:app].get_edit_app_store_version(platform: platform)
58
+ version = Deliver.cache[:app].get_edit_app_store_version(platform: platform)
59
59
 
60
60
  version.get_app_store_version_localizations.collect(&:locale)
61
61
  end
@@ -4,6 +4,12 @@ require 'fastlane/boolean'
4
4
 
5
5
  module Deliver
6
6
  class << self
7
+ attr_accessor :cache
8
+
9
+ def cache
10
+ @cache ||= {}
11
+ @cache
12
+ end
7
13
  end
8
14
 
9
15
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
@@ -109,11 +109,11 @@ module Deliver
109
109
  default_value: false,
110
110
  env_name: "DELIVER_EDIT_LIVE",
111
111
  description: "Modify live metadata, this option disables ipa upload and screenshot upload",
112
- is_string: false),
112
+ type: Boolean),
113
113
  FastlaneCore::ConfigItem.new(key: :use_live_version,
114
114
  env_name: "DELIVER_USE_LIVE_VERSION",
115
115
  description: "Force usage of live version rather than edit version",
116
- is_string: false,
116
+ type: Boolean,
117
117
  default_value: false),
118
118
 
119
119
  # paths
@@ -132,22 +132,22 @@ module Deliver
132
132
  FastlaneCore::ConfigItem.new(key: :skip_binary_upload,
133
133
  env_name: "DELIVER_SKIP_BINARY_UPLOAD",
134
134
  description: "Skip uploading an ipa or pkg to App Store Connect",
135
- is_string: false,
135
+ type: Boolean,
136
136
  default_value: false),
137
137
  FastlaneCore::ConfigItem.new(key: :skip_screenshots,
138
138
  env_name: "DELIVER_SKIP_SCREENSHOTS",
139
139
  description: "Don't upload the screenshots",
140
- is_string: false,
140
+ type: Boolean,
141
141
  default_value: false),
142
142
  FastlaneCore::ConfigItem.new(key: :skip_metadata,
143
143
  env_name: "DELIVER_SKIP_METADATA",
144
144
  description: "Don't upload the metadata (e.g. title, description). This will still upload screenshots",
145
- is_string: false,
145
+ type: Boolean,
146
146
  default_value: false),
147
147
  FastlaneCore::ConfigItem.new(key: :skip_app_version_update,
148
148
  env_name: "DELIVER_SKIP_APP_VERSION_UPDATE",
149
149
  description: "Don’t create or update the app version that is being prepared for submission",
150
- is_string: false,
150
+ type: Boolean,
151
151
  default_value: false),
152
152
 
153
153
  # how to operate
@@ -155,22 +155,22 @@ module Deliver
155
155
  short_option: "-f",
156
156
  env_name: "DELIVER_FORCE",
157
157
  description: "Skip verification of HTML preview file",
158
- is_string: false,
158
+ type: Boolean,
159
159
  default_value: false),
160
160
  FastlaneCore::ConfigItem.new(key: :overwrite_screenshots,
161
161
  env_name: "DELIVER_OVERWRITE_SCREENSHOTS",
162
162
  description: "Clear all previously uploaded screenshots before uploading the new ones",
163
- is_string: false,
163
+ type: Boolean,
164
164
  default_value: false),
165
165
  FastlaneCore::ConfigItem.new(key: :submit_for_review,
166
166
  env_name: "DELIVER_SUBMIT_FOR_REVIEW",
167
167
  description: "Submit the new version for Review after uploading everything",
168
- is_string: false,
168
+ type: Boolean,
169
169
  default_value: false),
170
170
  FastlaneCore::ConfigItem.new(key: :reject_if_possible,
171
171
  env_name: "DELIVER_REJECT_IF_POSSIBLE",
172
172
  description: "Rejects the previously submitted build if it's in a state where it's possible",
173
- is_string: false,
173
+ type: Boolean,
174
174
  default_value: false),
175
175
 
176
176
  # release
@@ -198,13 +198,13 @@ module Deliver
198
198
  env_name: "DELIVER_PHASED_RELEASE",
199
199
  description: "Enable the phased release feature of iTC",
200
200
  optional: true,
201
- is_string: false,
201
+ type: Boolean,
202
202
  default_value: false),
203
203
  FastlaneCore::ConfigItem.new(key: :reset_ratings,
204
204
  env_name: "DELIVER_RESET_RATINGS",
205
205
  description: "Reset the summary rating when you release a new version of the application",
206
206
  optional: true,
207
- is_string: false,
207
+ type: Boolean,
208
208
  default_value: false),
209
209
 
210
210
  # other app configuration
@@ -212,13 +212,12 @@ module Deliver
212
212
  short_option: "-r",
213
213
  env_name: "DELIVER_PRICE_TIER",
214
214
  description: "The price tier of this application",
215
- is_string: false,
215
+ type: Integer,
216
216
  optional: true),
217
217
  FastlaneCore::ConfigItem.new(key: :app_rating_config_path,
218
218
  short_option: "-g",
219
219
  env_name: "DELIVER_APP_RATING_CONFIG_PATH",
220
220
  description: "Path to the app rating's config",
221
- is_string: true,
222
221
  optional: true,
223
222
  verify_block: proc do |value|
224
223
  UI.user_error!("Could not find config file at path '#{File.expand_path(value)}'") unless File.exist?(value)
@@ -227,7 +226,6 @@ module Deliver
227
226
  FastlaneCore::ConfigItem.new(key: :submission_information,
228
227
  short_option: "-b",
229
228
  description: "Extra information for the submission (e.g. compliance specifications, IDFA settings)",
230
- is_string: false,
231
229
  type: Hash,
232
230
  optional: true),
233
231
 
@@ -237,7 +235,7 @@ module Deliver
237
235
  env_name: "DELIVER_TEAM_ID",
238
236
  description: "The ID of your App Store Connect team if you're in multiple teams",
239
237
  optional: true,
240
- is_string: false, # as we also allow integers, which we convert to strings anyway
238
+ skip_type_validation: true, # as we also allow integers, which we convert to strings anyway
241
239
  code_gen_sensitive: true,
242
240
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
243
241
  default_value_dynamic: true,
@@ -260,7 +258,6 @@ module Deliver
260
258
  env_name: "DELIVER_DEV_PORTAL_TEAM_ID",
261
259
  description: "The short ID of your Developer Portal team, if you're in multiple teams. Different from your iTC team ID!",
262
260
  optional: true,
263
- is_string: true,
264
261
  code_gen_sensitive: true,
265
262
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
266
263
  default_value_dynamic: true,
@@ -293,13 +290,13 @@ module Deliver
293
290
  short_option: "-x",
294
291
  env_name: "DELIVER_RUN_PRECHECK_BEFORE_SUBMIT",
295
292
  description: "Run precheck before submitting to app review",
296
- is_string: false,
293
+ type: Boolean,
297
294
  default_value: true),
298
295
  FastlaneCore::ConfigItem.new(key: :precheck_default_rule_level,
299
296
  short_option: "-d",
300
297
  env_name: "DELIVER_PRECHECK_DEFAULT_RULE_LEVEL",
301
298
  description: "The default precheck rule level unless otherwise configured",
302
- is_string: false,
299
+ type: Symbol,
303
300
  default_value: :warn),
304
301
 
305
302
  # App Metadata
@@ -307,7 +304,6 @@ module Deliver
307
304
  env_name: "DELIVER_INDIVUDAL_METADATA_ITEMS",
308
305
  description: "An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow",
309
306
  deprecated: "Removed after the migration to the new App Store Connect API in June 2020",
310
- is_string: false,
311
307
  type: Array,
312
308
  optional: true),
313
309
 
@@ -327,66 +323,56 @@ module Deliver
327
323
  FastlaneCore::ConfigItem.new(key: :copyright,
328
324
  env_name: "DELIVER_COPYRIGHT",
329
325
  description: "Metadata: The copyright notice",
330
- optional: true,
331
- is_string: true),
326
+ optional: true),
332
327
  FastlaneCore::ConfigItem.new(key: :primary_category,
333
328
  env_name: "DELIVER_PRIMARY_CATEGORY",
334
329
  description: "Metadata: The english name of the primary category (e.g. `Business`, `Books`)",
335
- optional: true,
336
- is_string: true),
330
+ optional: true),
337
331
  FastlaneCore::ConfigItem.new(key: :secondary_category,
338
332
  env_name: "DELIVER_SECONDARY_CATEGORY",
339
333
  description: "Metadata: The english name of the secondary category (e.g. `Business`, `Books`)",
340
- optional: true,
341
- is_string: true),
334
+ optional: true),
342
335
  FastlaneCore::ConfigItem.new(key: :primary_first_sub_category,
343
336
  env_name: "DELIVER_PRIMARY_FIRST_SUB_CATEGORY",
344
337
  description: "Metadata: The english name of the primary first sub category (e.g. `Educational`, `Puzzle`)",
345
- optional: true,
346
- is_string: true),
338
+ optional: true),
347
339
  FastlaneCore::ConfigItem.new(key: :primary_second_sub_category,
348
340
  env_name: "DELIVER_PRIMARY_SECOND_SUB_CATEGORY",
349
341
  description: "Metadata: The english name of the primary second sub category (e.g. `Educational`, `Puzzle`)",
350
- optional: true,
351
- is_string: true),
342
+ optional: true),
352
343
  FastlaneCore::ConfigItem.new(key: :secondary_first_sub_category,
353
344
  env_name: "DELIVER_SECONDARY_FIRST_SUB_CATEGORY",
354
345
  description: "Metadata: The english name of the secondary first sub category (e.g. `Educational`, `Puzzle`)",
355
- optional: true,
356
- is_string: true),
346
+ optional: true),
357
347
  FastlaneCore::ConfigItem.new(key: :secondary_second_sub_category,
358
348
  env_name: "DELIVER_SECONDARY_SECOND_SUB_CATEGORY",
359
349
  description: "Metadata: The english name of the secondary second sub category (e.g. `Educational`, `Puzzle`)",
360
- optional: true,
361
- is_string: true),
350
+ optional: true),
362
351
  FastlaneCore::ConfigItem.new(key: :trade_representative_contact_information,
363
352
  description: "Metadata: A hash containing the trade representative contact information",
364
353
  optional: true,
365
- is_string: false,
354
+ deprecated: "This is no longer used by App Store Connect",
366
355
  type: Hash),
367
356
  FastlaneCore::ConfigItem.new(key: :app_review_information,
368
357
  description: "Metadata: A hash containing the review information",
369
358
  optional: true,
370
- is_string: false,
371
359
  type: Hash),
372
360
  FastlaneCore::ConfigItem.new(key: :app_review_attachment_file,
373
361
  env_name: "DELIVER_APP_REVIEW_ATTACHMENT_FILE",
374
362
  description: "Metadata: Path to the app review attachment file",
375
- optional: true,
376
- is_string: true),
363
+ optional: true),
377
364
  # Localised
378
365
  FastlaneCore::ConfigItem.new(key: :description,
379
366
  description: "Metadata: The localised app description",
380
367
  optional: true,
381
- is_string: false),
368
+ type: Hash),
382
369
  FastlaneCore::ConfigItem.new(key: :name,
383
370
  description: "Metadata: The localised app name",
384
371
  optional: true,
385
- is_string: false),
372
+ type: Hash),
386
373
  FastlaneCore::ConfigItem.new(key: :subtitle,
387
374
  description: "Metadata: The localised app subtitle",
388
375
  optional: true,
389
- is_string: false,
390
376
  type: Hash,
391
377
  verify_block: proc do |value|
392
378
  UI.user_error!(":subtitle must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -394,7 +380,6 @@ module Deliver
394
380
  FastlaneCore::ConfigItem.new(key: :keywords,
395
381
  description: "Metadata: An array of localised keywords",
396
382
  optional: true,
397
- is_string: false,
398
383
  type: Hash,
399
384
  verify_block: proc do |value|
400
385
  UI.user_error!(":keywords must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -409,7 +394,6 @@ module Deliver
409
394
  FastlaneCore::ConfigItem.new(key: :promotional_text,
410
395
  description: "Metadata: An array of localised promotional texts",
411
396
  optional: true,
412
- is_string: false,
413
397
  type: Hash,
414
398
  verify_block: proc do |value|
415
399
  UI.user_error!(":keywords must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -417,23 +401,23 @@ module Deliver
417
401
  FastlaneCore::ConfigItem.new(key: :release_notes,
418
402
  description: "Metadata: Localised release notes for this version",
419
403
  optional: true,
420
- is_string: false),
404
+ type: Hash),
421
405
  FastlaneCore::ConfigItem.new(key: :privacy_url,
422
406
  description: "Metadata: Localised privacy url",
423
407
  optional: true,
424
- is_string: false),
408
+ type: Hash),
425
409
  FastlaneCore::ConfigItem.new(key: :apple_tv_privacy_policy,
426
410
  description: "Metadata: Localised Apple TV privacy policy text",
427
411
  optional: true,
428
- is_string: false),
412
+ type: Hash),
429
413
  FastlaneCore::ConfigItem.new(key: :support_url,
430
414
  description: "Metadata: Localised support url",
431
415
  optional: true,
432
- is_string: false),
416
+ type: Hash),
433
417
  FastlaneCore::ConfigItem.new(key: :marketing_url,
434
418
  description: "Metadata: Localised marketing url",
435
419
  optional: true,
436
- is_string: false),
420
+ type: Hash),
437
421
  # The verify_block has been removed from here and verification now happens in Deliver::DetectValues
438
422
  # Verification needed Spaceship::Tunes.client which required the Deliver::Runner to already by started
439
423
  FastlaneCore::ConfigItem.new(key: :languages,
@@ -445,11 +429,11 @@ module Deliver
445
429
  env_name: "DELIVER_IGNORE_LANGUAGE_DIRECTORY_VALIDATION",
446
430
  description: "Ignore errors when invalid languages are found in metadata and screenshot directories",
447
431
  default_value: false,
448
- is_string: false),
432
+ type: Boolean),
449
433
  FastlaneCore::ConfigItem.new(key: :precheck_include_in_app_purchases,
450
434
  env_name: "PRECHECK_INCLUDE_IN_APP_PURCHASES",
451
435
  description: "Should precheck check in-app purchases?",
452
- is_string: false,
436
+ type: Boolean,
453
437
  optional: true,
454
438
  default_value: true),
455
439
 
@@ -458,7 +442,8 @@ module Deliver
458
442
  short_option: "-p",
459
443
  env_name: "DELIVER_APP_ID",
460
444
  description: "The (spaceship) app ID of the app you want to use/modify",
461
- is_string: false) # don't add any verification here, as it's used to store a spaceship ref
445
+ optional: true,
446
+ type: Integer)
462
447
  ]
463
448
  end
464
449
  end