fastlane 2.212.0 → 2.212.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +88 -88
  3. data/deliver/lib/deliver/runner.rb +7 -7
  4. data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +15 -4
  5. data/fastlane/lib/fastlane/version.rb +1 -1
  6. data/fastlane/swift/Deliverfile.swift +1 -1
  7. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  8. data/fastlane/swift/Fastlane.swift +3 -3
  9. data/fastlane/swift/Gymfile.swift +1 -1
  10. data/fastlane/swift/GymfileProtocol.swift +1 -1
  11. data/fastlane/swift/Matchfile.swift +1 -1
  12. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  13. data/fastlane/swift/Precheckfile.swift +1 -1
  14. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  15. data/fastlane/swift/Scanfile.swift +1 -1
  16. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  17. data/fastlane/swift/Screengrabfile.swift +1 -1
  18. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  19. data/fastlane/swift/Snapshotfile.swift +1 -1
  20. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  21. data/fastlane/swift/formatting/Brewfile.lock.json +18 -18
  22. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +48 -14
  23. data/pilot/lib/pilot/build_manager.rb +4 -4
  24. data/snapshot/lib/snapshot/latest_os_version.rb +2 -5
  25. data/spaceship/lib/spaceship/client.rb +23 -0
  26. data/spaceship/lib/spaceship/connect_api/models/app.rb +2 -2
  27. data/spaceship/lib/spaceship/hashcash.rb +52 -0
  28. data/spaceship/lib/spaceship/tunes/tunes_client.rb +1 -1
  29. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +10 -2
  30. data/spaceship/lib/spaceship.rb +1 -0
  31. metadata +23 -24
  32. data/fastlane_core/lib/fastlane_core/.project.rb.swp +0 -0
  33. data/gym/lib/gym/.code_signing_mapping.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e057e50e5d579d53addcca0e59b39eb3eb48ddb90339e12943ab0512a040496c
4
- data.tar.gz: 7786048e835509e7db2e4ba5c4859ecd24fcfc9a4637a52da7ec84a568bf31a2
3
+ metadata.gz: 698222da63360e54a4d41e791a7ab1b2ac9331b348ef8626831d61a7261872de
4
+ data.tar.gz: c89309b1a27610bd6f51dfad0b471ac908bbec30e981edf7b56485e5f83738f4
5
5
  SHA512:
6
- metadata.gz: 45f7948df9f9a60123c09dedfc1159e84dc149b8b17be90494c02dbe55b531bedc3546d450861b63d32feedcc06de8774a1bab9db2050afcd0cc2038df268114
7
- data.tar.gz: 5acca0504847bb90327fc16ee1ea2842713ae0bfcbe3b92c8d813da352af5c6e5c37805f09ee25bfd1543e7ea17722751ac5b9e75fb1f1ca569e5e759ccdc407
6
+ metadata.gz: fc46b26354a94f87f630a434fcb0f8387f9d84661da4b01aa9ea72f565a97f864d6fb6f2124a7a9342ae91c3f3c59657452f99c255bf0c418ae5da33d821af32
7
+ data.tar.gz: 7198cdb4e60bf1c3c5b495307306a2888be696dd924a0e63aae7d787bdbfa5b4468d8a7f661f8fc741b79740801efcc603b32f912d9940a35373ec7230da5bd3
data/README.md CHANGED
@@ -35,43 +35,23 @@ 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='manish-rathi'>
39
- <a href='https://github.com/crazymanish'>
40
- <img src='https://github.com/crazymanish.png' width='140px;'>
41
- </a>
42
- <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
43
- </td>
44
38
  <td id='maksym-grebenets'>
45
39
  <a href='https://github.com/mgrebenets'>
46
40
  <img src='https://github.com/mgrebenets.png' width='140px;'>
47
41
  </a>
48
42
  <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
49
43
  </td>
50
- <td id='helmut-januschka'>
51
- <a href='https://github.com/hjanuschka'>
52
- <img src='https://github.com/hjanuschka.png' width='140px;'>
53
- </a>
54
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
55
- </td>
56
- <td id='jan-piotrowski'>
57
- <a href='https://github.com/janpio'>
58
- <img src='https://github.com/janpio.png' width='140px;'>
59
- </a>
60
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
61
- </td>
62
44
  <td id='iulian-onofrei'>
63
45
  <a href='https://github.com/revolter'>
64
46
  <img src='https://github.com/revolter.png' width='140px;'>
65
47
  </a>
66
48
  <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
67
49
  </td>
68
- </tr>
69
- <tr>
70
- <td id='kohki-miki'>
71
- <a href='https://github.com/giginet'>
72
- <img src='https://github.com/giginet.png' width='140px;'>
50
+ <td id='josh-holtz'>
51
+ <a href='https://github.com/joshdholtz'>
52
+ <img src='https://github.com/joshdholtz.png' width='140px;'>
73
53
  </a>
74
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
54
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
75
55
  </td>
76
56
  <td id='max-ott'>
77
57
  <a href='https://github.com/max-ott'>
@@ -79,37 +59,31 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
79
59
  </a>
80
60
  <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
81
61
  </td>
82
- <td id='fumiya-nakamura'>
83
- <a href='https://github.com/nafu'>
84
- <img src='https://github.com/nafu.png' width='140px;'>
85
- </a>
86
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
87
- </td>
88
- <td id='andrew-mcburney'>
89
- <a href='https://github.com/armcburney'>
90
- <img src='https://github.com/armcburney.png' width='140px;'>
91
- </a>
92
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
93
- </td>
94
- <td id='felix-krause'>
95
- <a href='https://github.com/KrauseFx'>
96
- <img src='https://github.com/KrauseFx.png' width='140px;'>
62
+ <td id='olivier-halligon'>
63
+ <a href='https://github.com/AliSoftware'>
64
+ <img src='https://github.com/AliSoftware.png' width='140px;'>
97
65
  </a>
98
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
66
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
99
67
  </td>
100
68
  </tr>
101
69
  <tr>
102
- <td id='daniel-jankowski'>
103
- <a href='https://github.com/mollyIV'>
104
- <img src='https://github.com/mollyIV.png' width='140px;'>
70
+ <td id='matthew-ellis'>
71
+ <a href='https://github.com/matthewellis'>
72
+ <img src='https://github.com/matthewellis.png' width='140px;'>
105
73
  </a>
106
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
74
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
107
75
  </td>
108
- <td id='stefan-natchev'>
109
- <a href='https://github.com/snatchev'>
110
- <img src='https://github.com/snatchev.png' width='140px;'>
76
+ <td id='helmut-januschka'>
77
+ <a href='https://github.com/hjanuschka'>
78
+ <img src='https://github.com/hjanuschka.png' width='140px;'>
111
79
  </a>
112
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
80
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
81
+ </td>
82
+ <td id='luka-mirosevic'>
83
+ <a href='https://github.com/lmirosevic'>
84
+ <img src='https://github.com/lmirosevic.png' width='140px;'>
85
+ </a>
86
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
113
87
  </td>
114
88
  <td id='roger-oba'>
115
89
  <a href='https://github.com/rogerluan'>
@@ -123,19 +97,31 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
123
97
  </a>
124
98
  <h4 align='center'>Łukasz Grabowski</h4>
125
99
  </td>
126
- <td id='josh-holtz'>
127
- <a href='https://github.com/joshdholtz'>
128
- <img src='https://github.com/joshdholtz.png' width='140px;'>
129
- </a>
130
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
131
- </td>
132
100
  </tr>
133
101
  <tr>
134
- <td id='jimmy-dee'>
135
- <a href='https://github.com/jdee'>
136
- <img src='https://github.com/jdee.png' width='140px;'>
102
+ <td id='jan-piotrowski'>
103
+ <a href='https://github.com/janpio'>
104
+ <img src='https://github.com/janpio.png' width='140px;'>
137
105
  </a>
138
- <h4 align='center'>Jimmy Dee</h4>
106
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
107
+ </td>
108
+ <td id='kohki-miki'>
109
+ <a href='https://github.com/giginet'>
110
+ <img src='https://github.com/giginet.png' width='140px;'>
111
+ </a>
112
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
113
+ </td>
114
+ <td id='aaron-brager'>
115
+ <a href='https://github.com/getaaron'>
116
+ <img src='https://github.com/getaaron.png' width='140px;'>
117
+ </a>
118
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</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>
139
125
  </td>
140
126
  <td id='jorge-revuelta-h'>
141
127
  <a href='https://github.com/minuscorp'>
@@ -143,17 +129,25 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
143
129
  </a>
144
130
  <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
145
131
  </td>
146
- <td id='matthew-ellis'>
147
- <a href='https://github.com/matthewellis'>
148
- <img src='https://github.com/matthewellis.png' width='140px;'>
132
+ </tr>
133
+ <tr>
134
+ <td id='danielle-tomlinson'>
135
+ <a href='https://github.com/endocrimes'>
136
+ <img src='https://github.com/endocrimes.png' width='140px;'>
149
137
  </a>
150
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
138
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
151
139
  </td>
152
- <td id='jérôme-lacoste'>
153
- <a href='https://github.com/lacostej'>
154
- <img src='https://github.com/lacostej.png' width='140px;'>
140
+ <td id='fumiya-nakamura'>
141
+ <a href='https://github.com/nafu'>
142
+ <img src='https://github.com/nafu.png' width='140px;'>
155
143
  </a>
156
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
144
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
145
+ </td>
146
+ <td id='felix-krause'>
147
+ <a href='https://github.com/KrauseFx'>
148
+ <img src='https://github.com/KrauseFx.png' width='140px;'>
149
+ </a>
150
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
157
151
  </td>
158
152
  <td id='satoshi-namai'>
159
153
  <a href='https://github.com/ainame'>
@@ -161,25 +155,37 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
161
155
  </a>
162
156
  <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
163
157
  </td>
158
+ <td id='stefan-natchev'>
159
+ <a href='https://github.com/snatchev'>
160
+ <img src='https://github.com/snatchev.png' width='140px;'>
161
+ </a>
162
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
163
+ </td>
164
164
  </tr>
165
165
  <tr>
166
- <td id='aaron-brager'>
167
- <a href='https://github.com/getaaron'>
168
- <img src='https://github.com/getaaron.png' width='140px;'>
166
+ <td id='jimmy-dee'>
167
+ <a href='https://github.com/jdee'>
168
+ <img src='https://github.com/jdee.png' width='140px;'>
169
169
  </a>
170
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
170
+ <h4 align='center'>Jimmy Dee</h4>
171
171
  </td>
172
- <td id='danielle-tomlinson'>
173
- <a href='https://github.com/endocrimes'>
174
- <img src='https://github.com/endocrimes.png' width='140px;'>
172
+ <td id='manu-wallner'>
173
+ <a href='https://github.com/milch'>
174
+ <img src='https://github.com/milch.png' width='140px;'>
175
175
  </a>
176
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
176
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
177
177
  </td>
178
- <td id='olivier-halligon'>
179
- <a href='https://github.com/AliSoftware'>
180
- <img src='https://github.com/AliSoftware.png' width='140px;'>
178
+ <td id='jérôme-lacoste'>
179
+ <a href='https://github.com/lacostej'>
180
+ <img src='https://github.com/lacostej.png' width='140px;'>
181
181
  </a>
182
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
182
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
183
+ </td>
184
+ <td id='manish-rathi'>
185
+ <a href='https://github.com/crazymanish'>
186
+ <img src='https://github.com/crazymanish.png' width='140px;'>
187
+ </a>
188
+ <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
183
189
  </td>
184
190
  <td id='joshua-liebowitz'>
185
191
  <a href='https://github.com/taquitos'>
@@ -187,19 +193,13 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
187
193
  </a>
188
194
  <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
189
195
  </td>
190
- <td id='luka-mirosevic'>
191
- <a href='https://github.com/lmirosevic'>
192
- <img src='https://github.com/lmirosevic.png' width='140px;'>
193
- </a>
194
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
195
- </td>
196
196
  </tr>
197
197
  <tr>
198
- <td id='manu-wallner'>
199
- <a href='https://github.com/milch'>
200
- <img src='https://github.com/milch.png' width='140px;'>
198
+ <td id='andrew-mcburney'>
199
+ <a href='https://github.com/armcburney'>
200
+ <img src='https://github.com/armcburney.png' width='140px;'>
201
201
  </a>
202
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
202
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
203
203
  </td>
204
204
  </table>
205
205
 
@@ -179,7 +179,7 @@ module Deliver
179
179
  package_path: "/tmp",
180
180
  platform: platform
181
181
  )
182
- result = transporter.verify(package_path: package_path)
182
+ result = transporter.verify(package_path: package_path, asset_path: ipa_path, platform: platform)
183
183
  when "osx"
184
184
  package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
185
185
  app_id: Deliver.cache[:app].id,
@@ -187,7 +187,7 @@ module Deliver
187
187
  package_path: "/tmp",
188
188
  platform: platform
189
189
  )
190
- result = transporter.verify(package_path: package_path)
190
+ result = transporter.verify(package_path: package_path, asset_path: pkg_path, platform: platform)
191
191
  else
192
192
  UI.user_error!("No suitable file found for verify for platform: #{options[:platform]}")
193
193
  end
@@ -206,7 +206,7 @@ module Deliver
206
206
  pkg_path = options[:pkg]
207
207
 
208
208
  platform = options[:platform]
209
- transporter = transporter_for_selected_team(upload: true)
209
+ transporter = transporter_for_selected_team
210
210
 
211
211
  case platform
212
212
  when "ios", "appletvos"
@@ -266,7 +266,7 @@ module Deliver
266
266
  # If itc_provider was explicitly specified, use it.
267
267
  # If there are multiple teams, infer the provider from the selected team name.
268
268
  # If there are fewer than two teams, don't infer the provider.
269
- def transporter_for_selected_team(upload: false)
269
+ def transporter_for_selected_team
270
270
  # Use JWT auth
271
271
  api_token = Spaceship::ConnectAPI.token
272
272
  api_key = if options[:api_key].nil? && !api_token.nil?
@@ -281,12 +281,12 @@ module Deliver
281
281
 
282
282
  unless api_token.nil?
283
283
  api_token.refresh! if api_token.expired?
284
- return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, upload: upload, api_key: api_key)
284
+ return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, altool_compatible_command: true, api_key: api_key)
285
285
  end
286
286
 
287
287
  tunes_client = Spaceship::ConnectAPI.client.tunes_client
288
288
 
289
- generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider], upload: upload, api_key: api_key)
289
+ generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider], altool_compatible_command: true, api_key: api_key)
290
290
  return generic_transporter unless options[:itc_provider].nil? && tunes_client.teams.count > 1
291
291
 
292
292
  begin
@@ -294,7 +294,7 @@ module Deliver
294
294
  name = team['name']
295
295
  provider_id = generic_transporter.provider_ids[name]
296
296
  UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
297
- return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id, upload: upload, api_key: api_key)
297
+ return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id, altool_compatible_command: true, api_key: api_key)
298
298
  rescue => ex
299
299
  UI.verbose("Couldn't infer a provider short name for team with id #{tunes_client.team_id} automatically: #{ex}. Proceeding without provider short name.")
300
300
  return generic_transporter
@@ -8,8 +8,9 @@ module Fastlane
8
8
  class EnsureGitStatusCleanAction < Action
9
9
  def self.run(params)
10
10
  if params[:ignored]
11
- ignored_file = params[:ignored]
12
- repo_status = Actions.sh("git status --porcelain --ignored #{ignored_file}")
11
+ ignored_mode = params[:ignored]
12
+ ignored_mode = 'no' if ignored_mode == 'none'
13
+ repo_status = Actions.sh("git status --porcelain --ignored='#{ignored_mode}'")
13
14
  else
14
15
  repo_status = Actions.sh("git status --porcelain")
15
16
  end
@@ -74,8 +75,18 @@ module Fastlane
74
75
  type: Boolean),
75
76
  FastlaneCore::ConfigItem.new(key: :ignored,
76
77
  env_name: "FL_ENSURE_GIT_STATUS_CLEAN_IGNORED_FILE",
77
- description: "The flag whether to ignore file the git status if the repo is dirty",
78
- optional: true)
78
+ description: [
79
+ "The handling mode of the ignored files. The available options are: `'traditional'`, `'none'` (default) and `'matching'`.",
80
+ "Specifying `'none'` to this parameter is the same as not specifying the parameter at all, which means that no ignored file will be used to check if the repo is dirty or not.",
81
+ "Specifying `'traditional'` or `'matching'` causes some ignored files to be used to check if the repo is dirty or not (more info in the official docs: https://git-scm.com/docs/git-status#Documentation/git-status.txt---ignoredltmodegt)"
82
+ ].join(" "),
83
+ optional: true,
84
+ verify_block: proc do |value|
85
+ mode = value.to_s
86
+ modes = %w(traditional none matching)
87
+
88
+ UI.user_error!("Unsupported mode, must be: #{modes}") unless modes.include?(mode)
89
+ end)
79
90
  ]
80
91
  end
81
92
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.212.0'.freeze
2
+ VERSION = '2.212.2'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '1.12.1'.freeze
@@ -17,4 +17,4 @@ public class Deliverfile: DeliverfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -264,4 +264,4 @@ public extension DeliverfileProtocol {
264
264
 
265
265
  // Please don't remove the lines below
266
266
  // They are used to detect outdated files
267
- // FastlaneRunnerAPIVersion [0.9.113]
267
+ // FastlaneRunnerAPIVersion [0.9.115]
@@ -4299,7 +4299,7 @@ public func ensureGitBranch(branch: String = "master") {
4299
4299
  - parameters:
4300
4300
  - showUncommittedChanges: The flag whether to show uncommitted changes if the repo is dirty
4301
4301
  - showDiff: The flag whether to show the git diff if the repo is dirty
4302
- - ignored: The flag whether to ignore file the git status if the repo is dirty
4302
+ - ignored: The handling mode of the ignored files. The available options are: `'traditional'`, `'none'` (default) and `'matching'`. Specifying `'none'` to this parameter is the same as not specifying the parameter at all, which means that no ignored file will be used to check if the repo is dirty or not. Specifying `'traditional'` or `'matching'` causes some ignored files to be used to check if the repo is dirty or not (more info in the official docs: https://git-scm.com/docs/git-status#Documentation/git-status.txt---ignoredltmodegt)
4303
4303
 
4304
4304
  A sanity check to make sure you are working in a repo that is clean.
4305
4305
  Especially useful to put at the beginning of your Fastfile in the `before_all` block, if some of your other actions will touch your filesystem, do things to your git repo, or just as a general reminder to save your work.
@@ -13370,7 +13370,7 @@ public func xcov(workspace: OptionalConfigValue<String?> = .fastlaneDefault(nil)
13370
13370
  coverallsServiceJobId: OptionalConfigValue<String?> = .fastlaneDefault(nil),
13371
13371
  coverallsRepoToken: OptionalConfigValue<String?> = .fastlaneDefault(nil),
13372
13372
  xcconfig: OptionalConfigValue<String?> = .fastlaneDefault(nil),
13373
- ideFoundationPath: String = "/Applications/Xcode-13.4.1.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
13373
+ ideFoundationPath: String = "/Applications/Xcode-14.1.0.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
13374
13374
  legacySupport: OptionalConfigValue<Bool> = .fastlaneDefault(false))
13375
13375
  {
13376
13376
  let workspaceArg = workspace.asRubyArgument(name: "workspace", type: nil)
@@ -13573,4 +13573,4 @@ public let snapshotfile: Snapshotfile = .init()
13573
13573
 
13574
13574
  // Please don't remove the lines below
13575
13575
  // They are used to detect outdated files
13576
- // FastlaneRunnerAPIVersion [0.9.166]
13576
+ // FastlaneRunnerAPIVersion [0.9.168]
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -208,4 +208,4 @@ public extension GymfileProtocol {
208
208
 
209
209
  // Please don't remove the lines below
210
210
  // They are used to detect outdated files
211
- // FastlaneRunnerAPIVersion [0.9.116]
211
+ // FastlaneRunnerAPIVersion [0.9.118]
@@ -17,4 +17,4 @@ public class Matchfile: MatchfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -208,4 +208,4 @@ public extension MatchfileProtocol {
208
208
 
209
209
  // Please don't remove the lines below
210
210
  // They are used to detect outdated files
211
- // FastlaneRunnerAPIVersion [0.9.110]
211
+ // FastlaneRunnerAPIVersion [0.9.112]
@@ -17,4 +17,4 @@ public class Precheckfile: PrecheckfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
52
52
 
53
53
  // Please don't remove the lines below
54
54
  // They are used to detect outdated files
55
- // FastlaneRunnerAPIVersion [0.9.109]
55
+ // FastlaneRunnerAPIVersion [0.9.111]
@@ -17,4 +17,4 @@ public class Scanfile: ScanfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -316,4 +316,4 @@ public extension ScanfileProtocol {
316
316
 
317
317
  // Please don't remove the lines below
318
318
  // They are used to detect outdated files
319
- // FastlaneRunnerAPIVersion [0.9.121]
319
+ // FastlaneRunnerAPIVersion [0.9.123]
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.111]
99
+ // FastlaneRunnerAPIVersion [0.9.113]
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.212.0
20
+ // Generated with fastlane 2.212.2
@@ -204,4 +204,4 @@ public extension SnapshotfileProtocol {
204
204
 
205
205
  // Please don't remove the lines below
206
206
  // They are used to detect outdated files
207
- // FastlaneRunnerAPIVersion [0.9.105]
207
+ // FastlaneRunnerAPIVersion [0.9.107]
@@ -2,45 +2,45 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.50.9",
5
+ "version": "0.51.6",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "root_url": "https://ghcr.io/v2/homebrew/core",
9
9
  "files": {
10
10
  "arm64_ventura": {
11
11
  "cellar": ":any_skip_relocation",
12
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:fd2f9e108c5485c1f2d0d89ef202fcafa50c09fbf64566430223e40648d1aee4",
13
- "sha256": "fd2f9e108c5485c1f2d0d89ef202fcafa50c09fbf64566430223e40648d1aee4"
12
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:71a684a6ccb9892d1382a6682a67db9b6c4e0db50f3e401aeaa4bd9bd2c17870",
13
+ "sha256": "71a684a6ccb9892d1382a6682a67db9b6c4e0db50f3e401aeaa4bd9bd2c17870"
14
14
  },
15
15
  "arm64_monterey": {
16
16
  "cellar": ":any_skip_relocation",
17
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:98ab8dbd40435f845b59d8d040d7795ead5e4faac82eb1eb8e660f658f59aa51",
18
- "sha256": "98ab8dbd40435f845b59d8d040d7795ead5e4faac82eb1eb8e660f658f59aa51"
17
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c7308dba4ff65f6c4b1516ec8ac3c207d38e8b88fedcb29baccdf606748b9b04",
18
+ "sha256": "c7308dba4ff65f6c4b1516ec8ac3c207d38e8b88fedcb29baccdf606748b9b04"
19
19
  },
20
20
  "arm64_big_sur": {
21
21
  "cellar": ":any_skip_relocation",
22
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:6e7cb8b7c30422f4277513ab362f95b7010a02ab4d08ae2be9b159d97ad97833",
23
- "sha256": "6e7cb8b7c30422f4277513ab362f95b7010a02ab4d08ae2be9b159d97ad97833"
22
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b80beeea8dfcce222aa998aae8431455644c607dca36ce9deaa23ba862239dfd",
23
+ "sha256": "b80beeea8dfcce222aa998aae8431455644c607dca36ce9deaa23ba862239dfd"
24
24
  },
25
25
  "ventura": {
26
26
  "cellar": ":any_skip_relocation",
27
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:deaa35f99636e9d2e5df80d8f638291eebaf53750ec3a0b2c6ccca7ebe75f5b8",
28
- "sha256": "deaa35f99636e9d2e5df80d8f638291eebaf53750ec3a0b2c6ccca7ebe75f5b8"
27
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:922f21c82c873425d7bd6064fc7b01c29a6fb9cc327ec0ac2aff6d65944f007c",
28
+ "sha256": "922f21c82c873425d7bd6064fc7b01c29a6fb9cc327ec0ac2aff6d65944f007c"
29
29
  },
30
30
  "monterey": {
31
31
  "cellar": ":any_skip_relocation",
32
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:e1ff4c783890b9b372b37f086b728a58783ce8f20f9db2cd34c89cd7e5baad8c",
33
- "sha256": "e1ff4c783890b9b372b37f086b728a58783ce8f20f9db2cd34c89cd7e5baad8c"
32
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:b0fa51fd3bff14854aea1c7be41dbecf4b11b229e8133eda6a61cc5b8364c1f3",
33
+ "sha256": "b0fa51fd3bff14854aea1c7be41dbecf4b11b229e8133eda6a61cc5b8364c1f3"
34
34
  },
35
35
  "big_sur": {
36
36
  "cellar": ":any_skip_relocation",
37
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:d2b8e64088220c937d50a6fad24daa490f04372cd5258dce7922fc9f6fcefbaa",
38
- "sha256": "d2b8e64088220c937d50a6fad24daa490f04372cd5258dce7922fc9f6fcefbaa"
37
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:a27afde79eed546acaf429a8489f9195d6633e21259d9269bab919d32e9b4223",
38
+ "sha256": "a27afde79eed546acaf429a8489f9195d6633e21259d9269bab919d32e9b4223"
39
39
  },
40
40
  "x86_64_linux": {
41
41
  "cellar": "/home/linuxbrew/.linuxbrew/Cellar",
42
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:293240d2b38f2ad02e4221c55895812774e78825bf9cd3e9b39a50c4c602e8d8",
43
- "sha256": "293240d2b38f2ad02e4221c55895812774e78825bf9cd3e9b39a50c4c602e8d8"
42
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:306d7ebf95846c3bccc426ee62915b73566ff3ea7e0fc859624c11b0dec817f2",
43
+ "sha256": "306d7ebf95846c3bccc426ee62915b73566ff3ea7e0fc859624c11b0dec817f2"
44
44
  }
45
45
  }
46
46
  }
@@ -74,12 +74,12 @@
74
74
  "macOS": "12.5"
75
75
  },
76
76
  "ventura": {
77
- "HOMEBREW_VERSION": "4.0.1-62-ga222a5b",
77
+ "HOMEBREW_VERSION": "4.0.13-42-gac0663a",
78
78
  "HOMEBREW_PREFIX": "/opt/homebrew",
79
79
  "Homebrew/homebrew-core": "api",
80
80
  "CLT": "",
81
- "Xcode": "13.4.1",
82
- "macOS": "13.1"
81
+ "Xcode": "14.1",
82
+ "macOS": "13.2.1"
83
83
  }
84
84
  }
85
85
  }
@@ -47,7 +47,7 @@ module FastlaneCore
47
47
  not_implemented(__method__)
48
48
  end
49
49
 
50
- def build_verify_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
50
+ def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
51
51
  not_implemented(__method__)
52
52
  end
53
53
 
@@ -307,8 +307,22 @@ module FastlaneCore
307
307
  raise "This feature has not been implemented yet with altool for Xcode 14"
308
308
  end
309
309
 
310
- def build_verify_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
311
- raise "This feature has not been implemented yet with altool for Xcode 14"
310
+ def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
311
+ api_key = kwargs[:api_key]
312
+ platform = kwargs[:platform]
313
+ use_api_key = !api_key.nil?
314
+ [
315
+ ("API_PRIVATE_KEYS_DIR=#{api_key[:key_dir]}" if use_api_key),
316
+ "xcrun altool",
317
+ "--validate-app",
318
+ ("-u #{username.shellescape}" unless use_api_key),
319
+ ("-p #{password.shellescape}" unless use_api_key),
320
+ ("--apiKey #{api_key[:key_id]}" if use_api_key),
321
+ ("--apiIssuer #{api_key[:issuer_id]}" if use_api_key),
322
+ ("--asc-provider #{provider_short_name}" unless use_api_key || provider_short_name.to_s.empty?),
323
+ platform_option(platform),
324
+ file_upload_option(source)
325
+ ].compact.join(' ')
312
326
  end
313
327
 
314
328
  def additional_upload_parameters
@@ -409,7 +423,8 @@ module FastlaneCore
409
423
  ].compact.join(' ')
410
424
  end
411
425
 
412
- def build_verify_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
426
+ def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
427
+ jwt = kwargs[:jwt]
413
428
  use_jwt = !jwt.to_s.empty?
414
429
  [
415
430
  '"' + Helper.transporter_path + '"',
@@ -504,7 +519,8 @@ module FastlaneCore
504
519
  end
505
520
  end
506
521
 
507
- def build_verify_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
522
+ def build_verify_command(username, password, source = "/tmp", provider_short_name = "", **kwargs)
523
+ jwt = kwargs[:jwt]
508
524
  use_jwt = !jwt.to_s.empty?
509
525
  if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
510
526
  [
@@ -660,7 +676,7 @@ module FastlaneCore
660
676
  # see: https://github.com/fastlane/fastlane/issues/1524#issuecomment-196370628
661
677
  # for more information about how to use the iTMSTransporter to list your provider
662
678
  # short names
663
- def initialize(user = nil, password = nil, use_shell_script = false, provider_short_name = nil, jwt = nil, upload: false, api_key: nil)
679
+ def initialize(user = nil, password = nil, use_shell_script = false, provider_short_name = nil, jwt = nil, altool_compatible_command: false, api_key: nil)
664
680
  # Xcode 6.x doesn't have the same iTMSTransporter Java setup as later Xcode versions, so
665
681
  # we can't default to using the newer direct Java invocation strategy for those versions.
666
682
  use_shell_script ||= Helper.is_mac? && Helper.xcode_version.start_with?('6.')
@@ -675,7 +691,7 @@ module FastlaneCore
675
691
  @jwt = jwt
676
692
  @api_key = api_key
677
693
 
678
- if should_use_altool?(upload, use_shell_script)
694
+ if should_use_altool?(altool_compatible_command, use_shell_script)
679
695
  UI.verbose("Using altool as transporter.")
680
696
  @transporter_executor = AltoolTransporterExecutor.new
681
697
  else
@@ -800,10 +816,20 @@ module FastlaneCore
800
816
  # @return (Bool) True if everything worked fine
801
817
  # @raise [Deliver::TransporterTransferError] when something went wrong
802
818
  # when transferring
803
- def verify(app_id = nil, dir = nil, package_path: nil)
804
- raise "Either a combination of app id and directory or a package_path are required" if (app_id.nil? || dir.nil?) && package_path.nil?
819
+ def verify(app_id = nil, dir = nil, package_path: nil, asset_path: nil, platform: nil)
820
+ raise "app_id and dir are required or package_path or asset_path is required" if (app_id.nil? || dir.nil?) && package_path.nil? && asset_path.nil?
821
+
822
+ force_itmsp = FastlaneCore::Env.truthy?("ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD")
823
+ can_use_asset_path = Helper.is_mac? && asset_path
805
824
 
806
- actual_dir = if package_path
825
+ actual_dir = if can_use_asset_path && !force_itmsp
826
+ # The asset gets deleted upon completion so copying to a temp directory
827
+ # (with randomized filename, for multibyte-mixed filename upload fails)
828
+ new_file_name = "#{SecureRandom.uuid}#{File.extname(asset_path)}"
829
+ tmp_asset_path = File.join(Dir.tmpdir, new_file_name)
830
+ FileUtils.cp(asset_path, tmp_asset_path)
831
+ tmp_asset_path
832
+ elsif package_path
807
833
  package_path
808
834
  else
809
835
  File.join(dir, "#{app_id}.itmsp")
@@ -812,8 +838,16 @@ module FastlaneCore
812
838
  password_placeholder = @jwt.nil? ? 'YourPassword' : nil
813
839
  jwt_placeholder = @jwt.nil? ? nil : 'YourJWT'
814
840
 
815
- command = @transporter_executor.build_verify_command(@user, @password, actual_dir, @provider_short_name, @jwt)
816
- UI.verbose(@transporter_executor.build_verify_command(@user, password_placeholder, actual_dir, @provider_short_name, jwt_placeholder))
841
+ # Handle AppStore Connect API
842
+ use_api_key = !@api_key.nil?
843
+
844
+ # Masking credentials for verbose outputs
845
+ api_key_placeholder = use_api_key ? { key_id: "YourKeyID", issuer_id: "YourIssuerID", key_dir: "YourTmpP8KeyDir" } : nil
846
+
847
+ api_key = api_key_with_p8_file_path(@api_key) if use_api_key
848
+
849
+ command = @transporter_executor.build_verify_command(@user, @password, actual_dir, @provider_short_name, jwt: @jwt, platform: platform, api_key: api_key)
850
+ UI.verbose(@transporter_executor.build_verify_command(@user, password_placeholder, actual_dir, @provider_short_name, jwt: jwt_placeholder, platform: platform, api_key: api_key_placeholder))
817
851
 
818
852
  begin
819
853
  result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
@@ -883,9 +917,9 @@ module FastlaneCore
883
917
  end
884
918
 
885
919
  # Returns whether altool should be used or ItunesTransporter should be used
886
- def should_use_altool?(upload, use_shell_script)
920
+ def should_use_altool?(altool_compatible_command, use_shell_script)
887
921
  # Xcode 14 no longer supports iTMSTransporter. Use altool instead
888
- !use_shell_script && upload && !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(14)
922
+ !use_shell_script && altool_compatible_command && !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(14)
889
923
  end
890
924
 
891
925
  # Returns the password to be used with the transporter
@@ -157,7 +157,7 @@ module Pilot
157
157
  end
158
158
  end
159
159
  platform = Spaceship::ConnectAPI::Platform.map(fetch_app_platform)
160
- build ||= Spaceship::ConnectAPI::Build.all(app_id: app.id, version: app_version, build_number: build_number, sort: "-uploadedDate", platform: platform, limit: 1).first
160
+ build ||= Spaceship::ConnectAPI::Build.all(app_id: app.id, version: app_version, build_number: build_number, sort: "-uploadedDate", platform: platform, limit: Spaceship::ConnectAPI::Platform.size).first
161
161
  end
162
162
 
163
163
  # Verify the build has all the includes that we need
@@ -401,13 +401,13 @@ module Pilot
401
401
 
402
402
  unless api_token.nil?
403
403
  api_token.refresh! if api_token.expired?
404
- return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, upload: true, api_key: api_key)
404
+ return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, altool_compatible_command: true, api_key: api_key)
405
405
  end
406
406
 
407
407
  # Otherwise use username and password
408
408
  tunes_client = Spaceship::ConnectAPI.client ? Spaceship::ConnectAPI.client.tunes_client : nil
409
409
 
410
- generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider], upload: true, api_key: api_key)
410
+ generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider], altool_compatible_command: true, api_key: api_key)
411
411
  return generic_transporter if options[:itc_provider] || tunes_client.nil?
412
412
  return generic_transporter unless tunes_client.teams.count > 1
413
413
 
@@ -416,7 +416,7 @@ module Pilot
416
416
  name = team['name']
417
417
  provider_id = generic_transporter.provider_ids[name]
418
418
  UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
419
- return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id, upload: true, api_key: api_key)
419
+ return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id, altool_compatible_command: true, api_key: api_key)
420
420
  rescue => ex
421
421
  STDERR.puts(ex.to_s)
422
422
  UI.verbose("Couldn't infer a provider short name for team with id #{tunes_client.team_id} automatically: #{ex}. Proceeding without provider short name.")
@@ -16,12 +16,9 @@ module Snapshot
16
16
  def self.version_for_os(os)
17
17
  # We do all this, because we would get all kind of crap output generated by xcodebuild
18
18
  # so we need to ignore stderror
19
- output = ''
20
- Open3.popen3('xcodebuild -version -sdk') do |stdin, stdout, stderr, wait_thr|
21
- output = stdout.read
22
- end
19
+ stdout, _stderr, _status = Open3.capture3('xcodebuild -version -sdk')
23
20
 
24
- matched = output.match(/#{os} ([\d\.]+) \(.*/)
21
+ matched = stdout.match(/#{os} ([\d\.]+) \(.*/)
25
22
  if matched.nil?
26
23
  FastlaneCore::UI.user_error!("Could not determine installed #{os} SDK version. Try running the _xcodebuild_ command manually to ensure it works.")
27
24
  elsif matched.length > 1
@@ -18,6 +18,7 @@ require_relative 'tunes/errors'
18
18
  require_relative 'globals'
19
19
  require_relative 'provider'
20
20
  require_relative 'stats_middleware'
21
+ require_relative 'hashcash'
21
22
 
22
23
  Faraday::Utils.default_params_encoder = Faraday::FlatParamsEncoder
23
24
 
@@ -490,6 +491,12 @@ module Spaceship
490
491
  modified_cookie.gsub!(unescaped_important_cookie, escaped_important_cookie)
491
492
  end
492
493
 
494
+ # Fixes issue https://github.com/fastlane/fastlane/issues/21071
495
+ # On 2023-02-23, Apple added a custom implementation
496
+ # of hashcash to their auth flow
497
+ # hashcash = nil
498
+ hashcash = self.fetch_hashcash
499
+
493
500
  response = request(:post) do |req|
494
501
  req.url("https://idmsa.apple.com/appleauth/auth/signin")
495
502
  req.body = data.to_json
@@ -498,6 +505,7 @@ module Spaceship
498
505
  req.headers['X-Apple-Widget-Key'] = self.itc_service_key
499
506
  req.headers['Accept'] = 'application/json, text/javascript'
500
507
  req.headers["Cookie"] = modified_cookie if modified_cookie
508
+ req.headers["X-Apple-HC"] = hashcash if hashcash
501
509
  end
502
510
  rescue UnauthorizedAccessError
503
511
  raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."
@@ -545,6 +553,21 @@ module Spaceship
545
553
  end
546
554
  # rubocop:enable Metrics/PerceivedComplexity
547
555
 
556
+ def fetch_hashcash
557
+ response = request(:get, "https://idmsa.apple.com/appleauth/auth/signin?widgetKey=#{self.itc_service_key}")
558
+ headers = response.headers
559
+
560
+ bits = headers["X-Apple-HC-Bits"]
561
+ challenge = headers["X-Apple-HC-Challenge"]
562
+
563
+ if bits.nil? || challenge.nil?
564
+ puts("Unable to find 'X-Apple-HC-Bits' and 'X-Apple-HC-Challenge' to make hashcash")
565
+ return nil
566
+ end
567
+
568
+ return Spaceship::Hashcash.make(bits: bits, challenge: challenge)
569
+ end
570
+
548
571
  # Get the `itctx` from the new (22nd May 2017) API endpoint "olympus"
549
572
  # Update (29th March 2019) olympus migrates to new appstoreconnect API
550
573
  def fetch_olympus_session
@@ -54,12 +54,12 @@ module Spaceship
54
54
  "contentRightsDeclaration" => "content_rights_declaration",
55
55
 
56
56
  "appStoreVersions" => "app_store_versions",
57
+ # This attribute is already deprecated. It will be removed in a future release.
57
58
  "prices" => "prices"
58
59
  })
59
60
 
60
61
  ESSENTIAL_INCLUDES = [
61
- "appStoreVersions",
62
- "prices"
62
+ "appStoreVersions"
63
63
  ].join(",")
64
64
 
65
65
  def self.type
@@ -0,0 +1,52 @@
1
+ require 'digest'
2
+
3
+ module Spaceship
4
+ module Hashcash
5
+ # This App Store Connect hashcash spec was generously donated by...
6
+ #
7
+ # __ _
8
+ # __ _ _ __ _ __ / _|(_) __ _ _ _ _ __ ___ ___
9
+ # / _` || '_ \ | '_ \ | |_ | | / _` || | | || '__|/ _ \/ __|
10
+ # | (_| || |_) || |_) || _|| || (_| || |_| || | | __/\__ \
11
+ # \__,_|| .__/ | .__/ |_| |_| \__, | \__,_||_| \___||___/
12
+ # |_| |_| |___/
13
+ #
14
+ #
15
+ # <summary>
16
+ # 1:11:20230223170600:4d74fb15eb23f465f1f6fcbf534e5877::6373
17
+ # X-APPLE-HC: 1:11:20230223170600:4d74fb15eb23f465f1f6fcbf534e5877::6373
18
+ # ^ ^ ^ ^ ^
19
+ # | | | | +-- Counter
20
+ # | | | +-- Resource
21
+ # | | +-- Date YYMMDD[hhmm[ss]]
22
+ # | +-- Bits (number of leading zeros)
23
+ # +-- Version
24
+ #
25
+ # We can't use an off-the-shelf Hashcash because Apple's implementation is not quite the same as the spec/convention.
26
+ # 1. The spec calls for a nonce called "Rand" to be inserted between the Ext and Counter. They don't do that at all.
27
+ # 2. The Counter conventionally encoded as base-64 but Apple just uses the decimal number's string representation.
28
+ #
29
+ # Iterate from Counter=0 to Counter=N finding an N that makes the SHA1(X-APPLE-HC) lead with Bits leading zero bits
30
+ #
31
+ #
32
+ # We get the "Resource" from the X-Apple-HC-Challenge header and Bits from X-Apple-HC-Bits
33
+ #
34
+ # </summary>
35
+ def self.make(bits:, challenge:)
36
+ version = 1
37
+ date = Time.now.strftime("%Y%m%d%H%M%S")
38
+
39
+ counter = 0
40
+ loop do
41
+ hc = [
42
+ version, bits, date, challenge, ":#{counter}"
43
+ ].join(":")
44
+
45
+ if Digest::SHA1.digest(hc).unpack1('B*')[0, bits.to_i].to_i == 0
46
+ return hc
47
+ end
48
+ counter += 1
49
+ end
50
+ end
51
+ end
52
+ end
@@ -272,7 +272,7 @@ module Spaceship
272
272
  # if it needs to
273
273
  #
274
274
  # https://github.com/fastlane/fastlane/pull/20480
275
- r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices")
275
+ r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions")
276
276
  response = Spaceship::ConnectAPI::Response.new(
277
277
  body: r.body,
278
278
  status: r.status,
@@ -61,9 +61,17 @@ module Spaceship
61
61
 
62
62
  # Send token to server to get a valid session
63
63
  r = request(:post) do |req|
64
- req.url("https://idmsa.apple.com/appleauth/auth/verify/device/#{device_id}/securitycode")
64
+ req.url("https://idmsa.apple.com/appleauth/auth/verify/phone/securitycode")
65
65
  req.headers['Content-Type'] = 'application/json'
66
- req.body = { "code" => code.to_s }.to_json
66
+ req.body = {
67
+ "phoneNumber": {
68
+ "id": device_id
69
+ },
70
+ "securityCode": {
71
+ "code" => code.to_s
72
+ },
73
+ "mode": "sms"
74
+ }.to_json
67
75
  update_request_headers(req)
68
76
  end
69
77
 
@@ -3,6 +3,7 @@ require_relative 'spaceship/base'
3
3
  require_relative 'spaceship/client'
4
4
  require_relative 'spaceship/provider'
5
5
  require_relative 'spaceship/launcher'
6
+ require_relative 'spaceship/hashcash'
6
7
 
7
8
  # Middleware
8
9
  require_relative 'spaceship/stats_middleware'
metadata CHANGED
@@ -1,39 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.212.0
4
+ version: 2.212.2
5
5
  platform: ruby
6
6
  authors:
7
- - Joshua Liebowitz
8
- - Łukasz Grabowski
9
- - Max Ott
10
- - Olivier Halligon
11
7
  - Maksym Grebenets
12
- - Danielle Tomlinson
13
- - Fumiya Nakamura
14
- - Felix Krause
15
- - Jérôme Lacoste
8
+ - Josh Holtz
16
9
  - Helmut Januschka
17
- - Iulian Onofrei
10
+ - Manu Wallner
18
11
  - Jimmy Dee
12
+ - Jérôme Lacoste
13
+ - Andrew McBurney
19
14
  - Jorge Revuelta H
20
- - Luka Mirosevic
21
- - Kohki Miki
22
- - Roger Oba
23
- - Manish Rathi
24
- - Josh Holtz
15
+ - Fumiya Nakamura
16
+ - Olivier Halligon
17
+ - Matthew Ellis
18
+ - Aaron Brager
25
19
  - Satoshi Namai
26
- - Stefan Natchev
27
- - Daniel Jankowski
20
+ - Łukasz Grabowski
21
+ - Joshua Liebowitz
22
+ - Felix Krause
28
23
  - Jan Piotrowski
29
- - Andrew McBurney
30
- - Manu Wallner
31
- - Aaron Brager
32
- - Matthew Ellis
24
+ - Manish Rathi
25
+ - Kohki Miki
26
+ - Max Ott
27
+ - Daniel Jankowski
28
+ - Stefan Natchev
29
+ - Luka Mirosevic
30
+ - Danielle Tomlinson
31
+ - Roger Oba
32
+ - Iulian Onofrei
33
33
  autorequire:
34
34
  bindir: bin
35
35
  cert_chain: []
36
- date: 2023-02-19 00:00:00.000000000 Z
36
+ date: 2023-04-16 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: xcodeproj
@@ -1395,7 +1395,6 @@ files:
1395
1395
  - fastlane_core/README.md
1396
1396
  - fastlane_core/lib/assets/XMLTemplate.xml.erb
1397
1397
  - fastlane_core/lib/fastlane_core.rb
1398
- - fastlane_core/lib/fastlane_core/.project.rb.swp
1399
1398
  - fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb
1400
1399
  - fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb
1401
1400
  - fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb
@@ -1479,7 +1478,6 @@ files:
1479
1478
  - gym/lib/assets/GymfileTemplate.swift
1480
1479
  - gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh
1481
1480
  - gym/lib/gym.rb
1482
- - gym/lib/gym/.code_signing_mapping.rb.swp
1483
1481
  - gym/lib/gym/code_signing_mapping.rb
1484
1482
  - gym/lib/gym/commands_generator.rb
1485
1483
  - gym/lib/gym/detect_values.rb
@@ -1743,6 +1741,7 @@ files:
1743
1741
  - spaceship/lib/spaceship/du/utilities.rb
1744
1742
  - spaceship/lib/spaceship/errors.rb
1745
1743
  - spaceship/lib/spaceship/globals.rb
1744
+ - spaceship/lib/spaceship/hashcash.rb
1746
1745
  - spaceship/lib/spaceship/helper/net_http_generic_request.rb
1747
1746
  - spaceship/lib/spaceship/helper/plist_middleware.rb
1748
1747
  - spaceship/lib/spaceship/helper/rels_middleware.rb