fastlane 2.198.1 → 2.199.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +98 -98
- data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
- data/fastlane/lib/.DS_Store +0 -0
- data/fastlane/lib/fastlane/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +25 -26
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +18 -1
- data/fastlane/lib/fastlane/actions/xcversion.rb +18 -3
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +18 -13
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Runner.swift +3 -7
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +3 -3
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +13 -13
- data/scan/lib/scan/options.rb +2 -2
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +35 -15
- data/spaceship/lib/spaceship/commands_generator.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/response.rb +13 -0
- data/spaceship/lib/spaceship/globals.rb +9 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
- data/trainer/lib/.DS_Store +0 -0
- metadata +24 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcbdda77dc3e29ac8d1ce7440033a3f95f610e367bbffb6cd9156899993b8311
|
4
|
+
data.tar.gz: 7eb108144336aa3038db856ae2ac36894095db6e8bf57b1dceb39b2b2e079abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 666df49eb19bb007a66bb4105ceb30330c609bd3d1105ed4a6ce295b48a7bdc01335199ec0a59d50fc75ff166d6f66155dbc336f4cfe71b65798a95f330b044c
|
7
|
+
data.tar.gz: a451304146470f1a8da8c2cdec8329a02b73bba9262641161eb0b884581d48b9cae404ad01e08bdf32d9ab58314bdaf4b645a61c4e50cc8aedf5d9113d2aa015
|
data/README.md
CHANGED
@@ -35,29 +35,17 @@ 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='
|
39
|
-
<a href='https://github.com/
|
40
|
-
<img src='https://github.com/
|
41
|
-
</a>
|
42
|
-
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
43
|
-
</td>
|
44
|
-
<td id='aaron-brager'>
|
45
|
-
<a href='https://github.com/getaaron'>
|
46
|
-
<img src='https://github.com/getaaron.png' width='140px;'>
|
47
|
-
</a>
|
48
|
-
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
49
|
-
</td>
|
50
|
-
<td id='andrew-mcburney'>
|
51
|
-
<a href='https://github.com/armcburney'>
|
52
|
-
<img src='https://github.com/armcburney.png' width='140px;'>
|
38
|
+
<td id='manish-rathi'>
|
39
|
+
<a href='https://github.com/crazymanish'>
|
40
|
+
<img src='https://github.com/crazymanish.png' width='140px;'>
|
53
41
|
</a>
|
54
|
-
<h4 align='center'><a href='https://twitter.com/
|
42
|
+
<h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
|
55
43
|
</td>
|
56
|
-
<td id='
|
57
|
-
<a href='https://github.com/
|
58
|
-
<img src='https://github.com/
|
44
|
+
<td id='satoshi-namai'>
|
45
|
+
<a href='https://github.com/ainame'>
|
46
|
+
<img src='https://github.com/ainame.png' width='140px;'>
|
59
47
|
</a>
|
60
|
-
<h4 align='center'><a href='https://twitter.com/
|
48
|
+
<h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
|
61
49
|
</td>
|
62
50
|
<td id='matthew-ellis'>
|
63
51
|
<a href='https://github.com/matthewellis'>
|
@@ -65,133 +53,145 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
65
53
|
</a>
|
66
54
|
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
67
55
|
</td>
|
56
|
+
<td id='helmut-januschka'>
|
57
|
+
<a href='https://github.com/hjanuschka'>
|
58
|
+
<img src='https://github.com/hjanuschka.png' width='140px;'>
|
59
|
+
</a>
|
60
|
+
<h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
|
61
|
+
</td>
|
62
|
+
<td id='iulian-onofrei'>
|
63
|
+
<a href='https://github.com/revolter'>
|
64
|
+
<img src='https://github.com/revolter.png' width='140px;'>
|
65
|
+
</a>
|
66
|
+
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
67
|
+
</td>
|
68
68
|
</tr>
|
69
69
|
<tr>
|
70
|
-
<td id='
|
71
|
-
<a href='https://github.com/
|
72
|
-
<img src='https://github.com/
|
70
|
+
<td id='stefan-natchev'>
|
71
|
+
<a href='https://github.com/snatchev'>
|
72
|
+
<img src='https://github.com/snatchev.png' width='140px;'>
|
73
73
|
</a>
|
74
|
-
<h4 align='center'><a href='https://twitter.com/
|
74
|
+
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
75
75
|
</td>
|
76
|
-
<td id='
|
77
|
-
<a href='https://github.com/
|
78
|
-
<img src='https://github.com/
|
76
|
+
<td id='andrew-mcburney'>
|
77
|
+
<a href='https://github.com/armcburney'>
|
78
|
+
<img src='https://github.com/armcburney.png' width='140px;'>
|
79
79
|
</a>
|
80
|
-
<h4 align='center'><a href='https://twitter.com/
|
80
|
+
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
81
81
|
</td>
|
82
|
-
<td id='
|
83
|
-
<a href='https://github.com/
|
84
|
-
<img src='https://github.com/
|
82
|
+
<td id='daniel-jankowski'>
|
83
|
+
<a href='https://github.com/mollyIV'>
|
84
|
+
<img src='https://github.com/mollyIV.png' width='140px;'>
|
85
85
|
</a>
|
86
|
-
<h4 align='center'><a href='https://twitter.com/
|
86
|
+
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
87
87
|
</td>
|
88
|
-
<td id='
|
89
|
-
<a href='https://github.com/
|
90
|
-
<img src='https://github.com/
|
88
|
+
<td id='max-ott'>
|
89
|
+
<a href='https://github.com/max-ott'>
|
90
|
+
<img src='https://github.com/max-ott.png' width='140px;'>
|
91
91
|
</a>
|
92
|
-
<h4 align='center'><a href='https://twitter.com/
|
92
|
+
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
93
93
|
</td>
|
94
|
-
<td id='
|
95
|
-
<a href='https://github.com/
|
96
|
-
<img src='https://github.com/
|
94
|
+
<td id='joshua-liebowitz'>
|
95
|
+
<a href='https://github.com/taquitos'>
|
96
|
+
<img src='https://github.com/taquitos.png' width='140px;'>
|
97
97
|
</a>
|
98
|
-
<h4 align='center'><a href='https://twitter.com/
|
98
|
+
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
99
99
|
</td>
|
100
100
|
</tr>
|
101
101
|
<tr>
|
102
|
-
<td id='
|
103
|
-
<a href='https://github.com/
|
104
|
-
<img src='https://github.com/
|
102
|
+
<td id='olivier-halligon'>
|
103
|
+
<a href='https://github.com/AliSoftware'>
|
104
|
+
<img src='https://github.com/AliSoftware.png' width='140px;'>
|
105
105
|
</a>
|
106
|
-
<h4 align='center'><a href='https://twitter.com/
|
106
|
+
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
107
107
|
</td>
|
108
|
-
<td id='
|
109
|
-
<a href='https://github.com/
|
110
|
-
<img src='https://github.com/
|
108
|
+
<td id='aaron-brager'>
|
109
|
+
<a href='https://github.com/getaaron'>
|
110
|
+
<img src='https://github.com/getaaron.png' width='140px;'>
|
111
111
|
</a>
|
112
|
-
<h4 align='center'><a href='https://twitter.com/
|
112
|
+
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
113
113
|
</td>
|
114
|
-
<td id='
|
115
|
-
<a href='https://github.com/
|
116
|
-
<img src='https://github.com/
|
114
|
+
<td id='felix-krause'>
|
115
|
+
<a href='https://github.com/KrauseFx'>
|
116
|
+
<img src='https://github.com/KrauseFx.png' width='140px;'>
|
117
117
|
</a>
|
118
|
-
<h4 align='center'><a href='https://twitter.com/
|
118
|
+
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
119
119
|
</td>
|
120
|
-
<td id='
|
121
|
-
<a href='https://github.com/
|
122
|
-
<img src='https://github.com/
|
120
|
+
<td id='danielle-tomlinson'>
|
121
|
+
<a href='https://github.com/endocrimes'>
|
122
|
+
<img src='https://github.com/endocrimes.png' width='140px;'>
|
123
123
|
</a>
|
124
|
-
<h4 align='center'><a href='https://twitter.com/
|
124
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
125
125
|
</td>
|
126
|
-
<td id='
|
127
|
-
<a href='https://github.com/
|
128
|
-
<img src='https://github.com/
|
126
|
+
<td id='josh-holtz'>
|
127
|
+
<a href='https://github.com/joshdholtz'>
|
128
|
+
<img src='https://github.com/joshdholtz.png' width='140px;'>
|
129
129
|
</a>
|
130
|
-
<h4 align='center'><a href='https://twitter.com/
|
130
|
+
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
131
131
|
</td>
|
132
132
|
</tr>
|
133
133
|
<tr>
|
134
|
+
<td id='jorge-revuelta-h'>
|
135
|
+
<a href='https://github.com/minuscorp'>
|
136
|
+
<img src='https://github.com/minuscorp.png' width='140px;'>
|
137
|
+
</a>
|
138
|
+
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
139
|
+
</td>
|
134
140
|
<td id='jimmy-dee'>
|
135
141
|
<a href='https://github.com/jdee'>
|
136
142
|
<img src='https://github.com/jdee.png' width='140px;'>
|
137
143
|
</a>
|
138
144
|
<h4 align='center'>Jimmy Dee</h4>
|
139
145
|
</td>
|
140
|
-
<td id='
|
141
|
-
<a href='https://github.com/
|
142
|
-
<img src='https://github.com/
|
143
|
-
</a>
|
144
|
-
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
145
|
-
</td>
|
146
|
-
<td id='max-ott'>
|
147
|
-
<a href='https://github.com/max-ott'>
|
148
|
-
<img src='https://github.com/max-ott.png' width='140px;'>
|
146
|
+
<td id='manu-wallner'>
|
147
|
+
<a href='https://github.com/milch'>
|
148
|
+
<img src='https://github.com/milch.png' width='140px;'>
|
149
149
|
</a>
|
150
|
-
<h4 align='center'><a href='https://twitter.com/
|
150
|
+
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
151
151
|
</td>
|
152
|
-
<td id='
|
153
|
-
<a href='https://github.com/
|
154
|
-
<img src='https://github.com/
|
152
|
+
<td id='kohki-miki'>
|
153
|
+
<a href='https://github.com/giginet'>
|
154
|
+
<img src='https://github.com/giginet.png' width='140px;'>
|
155
155
|
</a>
|
156
|
-
<h4 align='center'><a href='https://twitter.com/
|
156
|
+
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
157
157
|
</td>
|
158
|
-
<td id='
|
159
|
-
<a href='https://github.com/
|
160
|
-
<img src='https://github.com/
|
158
|
+
<td id='jérôme-lacoste'>
|
159
|
+
<a href='https://github.com/lacostej'>
|
160
|
+
<img src='https://github.com/lacostej.png' width='140px;'>
|
161
161
|
</a>
|
162
|
-
<h4 align='center'><a href='https://twitter.com/
|
162
|
+
<h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
|
163
163
|
</td>
|
164
164
|
</tr>
|
165
165
|
<tr>
|
166
|
-
<td id='
|
167
|
-
<a href='https://github.com/
|
168
|
-
<img src='https://github.com/
|
166
|
+
<td id='maksym-grebenets'>
|
167
|
+
<a href='https://github.com/mgrebenets'>
|
168
|
+
<img src='https://github.com/mgrebenets.png' width='140px;'>
|
169
169
|
</a>
|
170
|
-
<h4 align='center'><a href='https://twitter.com/
|
170
|
+
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
171
171
|
</td>
|
172
|
-
<td id='
|
173
|
-
<a href='https://github.com/
|
174
|
-
<img src='https://github.com/
|
172
|
+
<td id='roger-oba'>
|
173
|
+
<a href='https://github.com/rogerluan'>
|
174
|
+
<img src='https://github.com/rogerluan.png' width='140px;'>
|
175
175
|
</a>
|
176
|
-
<h4 align='center'><a href='https://twitter.com/
|
176
|
+
<h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
|
177
177
|
</td>
|
178
|
-
<td id='
|
179
|
-
<a href='https://github.com/
|
180
|
-
<img src='https://github.com/
|
178
|
+
<td id='jan-piotrowski'>
|
179
|
+
<a href='https://github.com/janpio'>
|
180
|
+
<img src='https://github.com/janpio.png' width='140px;'>
|
181
181
|
</a>
|
182
|
-
<h4 align='center'><a href='https://twitter.com/
|
182
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
183
183
|
</td>
|
184
|
-
<td id='
|
185
|
-
<a href='https://github.com/
|
186
|
-
<img src='https://github.com/
|
184
|
+
<td id='fumiya-nakamura'>
|
185
|
+
<a href='https://github.com/nafu'>
|
186
|
+
<img src='https://github.com/nafu.png' width='140px;'>
|
187
187
|
</a>
|
188
|
-
<h4 align='center'><a href='https://twitter.com/
|
188
|
+
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
189
189
|
</td>
|
190
|
-
<td id='
|
191
|
-
<a href='https://github.com/
|
192
|
-
<img src='https://github.com/
|
190
|
+
<td id='luka-mirosevic'>
|
191
|
+
<a href='https://github.com/lmirosevic'>
|
192
|
+
<img src='https://github.com/lmirosevic.png' width='140px;'>
|
193
193
|
</a>
|
194
|
-
<h4 align='center'><a href='https://twitter.com/
|
194
|
+
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
195
195
|
</td>
|
196
196
|
</tr>
|
197
197
|
</table>
|
@@ -80,7 +80,7 @@ module Deliver
|
|
80
80
|
screenshots_per_display_type = screenshots_for_language.reject { |screenshot| screenshot.device_type.nil? }.group_by(&:device_type)
|
81
81
|
|
82
82
|
screenshots_per_display_type.each do |display_type, screenshots|
|
83
|
-
# create AppScreenshotSet for given display_type if it doesn't
|
83
|
+
# create AppScreenshotSet for given display_type if it doesn't exist
|
84
84
|
app_screenshot_set = (app_screenshot_set_per_locale_and_display_type[language] || {})[display_type]
|
85
85
|
app_screenshot_set ||= localization.create_app_screenshot_set(attributes: { screenshotDisplayType: display_type })
|
86
86
|
|
Binary file
|
Binary file
|
Binary file
|
@@ -75,10 +75,11 @@ module Fastlane
|
|
75
75
|
|
76
76
|
filter = { app: app.id }
|
77
77
|
filter["preReleaseVersion.platform"] = platform
|
78
|
-
|
79
|
-
|
78
|
+
filter["preReleaseVersion.version"] = version if version
|
79
|
+
filter["version"] = build_number if build_number
|
80
|
+
build_resp = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion,buildBundles")
|
80
81
|
|
81
|
-
|
82
|
+
build_resp.all_pages_each do |build|
|
82
83
|
asc_app_version = build.app_version
|
83
84
|
asc_build_number = build.version
|
84
85
|
uploaded_date = DateTime.parse(build.uploaded_date)
|
@@ -114,39 +115,37 @@ module Fastlane
|
|
114
115
|
end
|
115
116
|
|
116
117
|
UI.verbose("Build_version: #{asc_build_number} matches #{build_number}, grabbing dsym_url") if build_number
|
117
|
-
|
118
|
-
build.build_bundles&.each do |build_bundle|
|
119
|
-
download_dsym(build_bundle: build_bundle, build: build, app: app, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
|
120
|
-
end
|
118
|
+
download_dsym(build: build, app: app, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
|
121
119
|
end
|
122
120
|
end
|
123
121
|
|
124
|
-
def self.download_dsym(
|
122
|
+
def self.download_dsym(build: nil, app: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
|
125
123
|
start = Time.now
|
126
|
-
|
124
|
+
dsym_urls = []
|
127
125
|
|
128
126
|
loop do
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
127
|
+
build_bundles = build.build_bundles.select { |b| b.includes_symbols == true }
|
128
|
+
dsym_urls = build_bundles.map(&:dsym_url).compact
|
129
|
+
|
130
|
+
break if build_bundles.count == dsym_urls.count
|
131
|
+
|
132
|
+
if !wait_for_dsym_processing || (Time.now - start) > wait_timeout
|
133
|
+
# In some cases, AppStoreConnect does not process the dSYMs, thus no error should be thrown.
|
134
|
+
UI.message("Could not find any dSYM for #{build.version} (#{build.app_version})")
|
135
|
+
break
|
136
|
+
else
|
137
|
+
UI.message("Waiting for dSYM file to appear...")
|
138
|
+
sleep(30) unless FastlaneCore::Helper.is_test?
|
139
|
+
build = Spaceship::ConnectAPI::Build.get(build_id: build.id)
|
140
140
|
end
|
141
|
-
|
142
|
-
break
|
143
141
|
end
|
144
142
|
|
145
|
-
if
|
146
|
-
self.download(download_url, build, app, output_directory)
|
147
|
-
return if build.version
|
148
|
-
else
|
143
|
+
if dsym_urls.count == 0
|
149
144
|
UI.message("No dSYM URL for #{build.version} (#{build.app_version})")
|
145
|
+
else
|
146
|
+
dsym_urls.each do |url|
|
147
|
+
self.download(url, build, app, output_directory)
|
148
|
+
end
|
150
149
|
end
|
151
150
|
end
|
152
151
|
# rubocop:enable Metrics/PerceivedComplexity
|
@@ -75,7 +75,7 @@ module Fastlane
|
|
75
75
|
[
|
76
76
|
"If building your app requires a specific version of Xcode, you can invoke this command before using gym.",
|
77
77
|
"For example, to ensure that a beta version of Xcode is not accidentally selected to build, which would make uploading to TestFlight fail.",
|
78
|
-
"You can either manually provide a specific version using `version
|
78
|
+
"You can either manually provide a specific version using `version:` or you make use of the `.xcode-version` file.",
|
79
79
|
"Using the `strict` parameter, you can either verify the full set of version numbers strictly (i.e. `11.3.1`) or only a subset of them (i.e. `11.3` or `11`)."
|
80
80
|
].join("\n")
|
81
81
|
end
|
@@ -50,6 +50,10 @@ module Fastlane
|
|
50
50
|
set_build_setting(config, "PROVISIONING_PROFILE_SPECIFIER", params[:profile_name])
|
51
51
|
UI.important("Set Provisioning Profile name to: #{params[:profile_name]} for target: #{target.name} for build configuration: #{config.name}")
|
52
52
|
end
|
53
|
+
if params[:entitlements_file_path]
|
54
|
+
set_build_setting(config, "CODE_SIGN_ENTITLEMENTS", params[:entitlements_file_path])
|
55
|
+
UI.important("Set Entitlements file path to: #{params[:entitlements_file_path]} for target: #{target.name} for build configuration: #{config.name}")
|
56
|
+
end
|
53
57
|
# Since Xcode 8, this is no longer needed, you simply use PROVISIONING_PROFILE_SPECIFIER
|
54
58
|
if params[:profile_uuid]
|
55
59
|
set_build_setting(config, "PROVISIONING_PROFILE", params[:profile_uuid])
|
@@ -143,6 +147,10 @@ module Fastlane
|
|
143
147
|
env_name: "FL_CODE_SIGN_IDENTITY",
|
144
148
|
description: "Code signing identity type (iPhone Developer, iPhone Distribution)",
|
145
149
|
optional: true),
|
150
|
+
FastlaneCore::ConfigItem.new(key: :entitlements_file_path,
|
151
|
+
env_name: "FL_CODE_SIGN_ENTITLEMENTS_FILE_PATH",
|
152
|
+
description: "Path to your entitlements file",
|
153
|
+
optional: true),
|
146
154
|
FastlaneCore::ConfigItem.new(key: :profile_name,
|
147
155
|
env_name: "FL_PROVISIONING_PROFILE_SPECIFIER",
|
148
156
|
description: "Provisioning profile name to use for code signing",
|
@@ -172,6 +180,15 @@ module Fastlane
|
|
172
180
|
update_code_signing_settings(
|
173
181
|
use_automatic_signing: true,
|
174
182
|
path: "demo-project/demo/demo.xcodeproj"
|
183
|
+
)',
|
184
|
+
' # more advanced manual code signing
|
185
|
+
update_code_signing_settings(
|
186
|
+
use_automatic_signing: true,
|
187
|
+
path: "demo-project/demo/demo.xcodeproj",
|
188
|
+
team_id: "QABC123DEV",
|
189
|
+
bundle_identifier: "com.demoapp.QABC123DEV",
|
190
|
+
profile_name: "Demo App Deployment Profile",
|
191
|
+
entitlements_file_path: "Demo App/generated/New.entitlements"
|
175
192
|
)'
|
176
193
|
]
|
177
194
|
end
|
@@ -185,7 +202,7 @@ module Fastlane
|
|
185
202
|
end
|
186
203
|
|
187
204
|
def self.authors
|
188
|
-
["mathiasAichinger", "hjanuschka", "p4checo", "portellaa", "aeons", "att55"]
|
205
|
+
["mathiasAichinger", "hjanuschka", "p4checo", "portellaa", "aeons", "att55", "abcdev"]
|
189
206
|
end
|
190
207
|
|
191
208
|
def self.is_supported?(platform)
|
@@ -5,6 +5,7 @@ module Fastlane
|
|
5
5
|
Actions.verify_gem!('xcode-install')
|
6
6
|
|
7
7
|
version = params[:version]
|
8
|
+
|
8
9
|
xcode = Helper::XcversionHelper.find_xcode(version)
|
9
10
|
UI.user_error!("Cannot find an installed Xcode satisfying '#{version}'") if xcode.nil?
|
10
11
|
|
@@ -14,16 +15,29 @@ module Fastlane
|
|
14
15
|
ENV["DEVELOPER_DIR"] = File.join(xcode.path, "/Contents/Developer")
|
15
16
|
end
|
16
17
|
|
18
|
+
def self.read_xcode_version_file
|
19
|
+
xcode_version_paths = Dir.glob(".xcode-version")
|
20
|
+
|
21
|
+
if xcode_version_paths.first
|
22
|
+
return File.read(xcode_version_paths.first).strip
|
23
|
+
end
|
24
|
+
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
|
17
28
|
def self.description
|
18
29
|
"Select an Xcode to use by version specifier"
|
19
30
|
end
|
20
31
|
|
21
32
|
def self.details
|
22
|
-
|
33
|
+
[
|
34
|
+
"Finds and selects a version of an installed Xcode that best matches the provided [`Gem::Version` requirement specifier](http://www.rubydoc.info/github/rubygems/rubygems/Gem/Version)",
|
35
|
+
"You can either manually provide a specific version using `version:` or you make use of the `.xcode-version` file."
|
36
|
+
].join("\n")
|
23
37
|
end
|
24
38
|
|
25
39
|
def self.authors
|
26
|
-
["oysta"]
|
40
|
+
["oysta", "rogerluan"]
|
27
41
|
end
|
28
42
|
|
29
43
|
def self.available_options
|
@@ -31,7 +45,8 @@ module Fastlane
|
|
31
45
|
FastlaneCore::ConfigItem.new(key: :version,
|
32
46
|
env_name: "FL_XCODE_VERSION",
|
33
47
|
description: "The version of Xcode to select specified as a Gem::Version requirement string (e.g. '~> 7.1.0')",
|
34
|
-
|
48
|
+
default_value: self.read_xcode_version_file,
|
49
|
+
default_value_dynamic: true,
|
35
50
|
verify_block: Helper::XcversionHelper::Verify.method(:requirement))
|
36
51
|
]
|
37
52
|
end
|
@@ -4,21 +4,18 @@ module Fastlane
|
|
4
4
|
output_path ||= File.join(FastlaneCore::FastlaneFolder.path || '.', 'README.md')
|
5
5
|
|
6
6
|
output = ["fastlane documentation"]
|
7
|
-
output << "
|
7
|
+
output << "----"
|
8
|
+
output << ""
|
8
9
|
|
9
10
|
output << "# Installation"
|
10
11
|
output << ""
|
11
12
|
output << "Make sure you have the latest version of the Xcode command line tools installed:"
|
12
13
|
output << ""
|
13
|
-
output << "```"
|
14
|
+
output << "```sh"
|
14
15
|
output << "xcode-select --install"
|
15
16
|
output << "```"
|
16
17
|
output << ""
|
17
|
-
output << "
|
18
|
-
output << "```"
|
19
|
-
output << "[sudo] gem install fastlane -NV"
|
20
|
-
output << "```"
|
21
|
-
output << "or alternatively using `brew install fastlane`"
|
18
|
+
output << "For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)"
|
22
19
|
output << ""
|
23
20
|
output << "# Available Actions"
|
24
21
|
|
@@ -32,7 +29,10 @@ module Fastlane
|
|
32
29
|
next
|
33
30
|
end
|
34
31
|
|
35
|
-
|
32
|
+
if platform
|
33
|
+
output << ""
|
34
|
+
output << "## #{formatted_platform(platform)}"
|
35
|
+
end
|
36
36
|
|
37
37
|
lanes.each do |lane_name, lane|
|
38
38
|
next if lane.is_private
|
@@ -45,8 +45,10 @@ module Fastlane
|
|
45
45
|
end
|
46
46
|
|
47
47
|
output << "This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run."
|
48
|
-
output << "
|
49
|
-
output << "
|
48
|
+
output << ""
|
49
|
+
output << "More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools)."
|
50
|
+
output << ""
|
51
|
+
output << "The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools)."
|
50
52
|
output << ""
|
51
53
|
|
52
54
|
begin
|
@@ -78,10 +80,13 @@ module Fastlane
|
|
78
80
|
full_name = [platform, lane].reject(&:nil?).join(' ')
|
79
81
|
|
80
82
|
output = []
|
83
|
+
output << ""
|
81
84
|
output << "### #{full_name}"
|
85
|
+
output << ""
|
86
|
+
output << "```sh"
|
87
|
+
output << "[bundle exec] fastlane #{full_name}"
|
82
88
|
output << "```"
|
83
|
-
output << "
|
84
|
-
output << "```"
|
89
|
+
output << ""
|
85
90
|
output << description
|
86
91
|
output
|
87
92
|
end
|
@@ -4323,7 +4323,7 @@ public func ensureNoDebugCode(text: String,
|
|
4323
4323
|
|
4324
4324
|
If building your app requires a specific version of Xcode, you can invoke this command before using gym.
|
4325
4325
|
For example, to ensure that a beta version of Xcode is not accidentally selected to build, which would make uploading to TestFlight fail.
|
4326
|
-
You can either manually provide a specific version using `version
|
4326
|
+
You can either manually provide a specific version using `version:` or you make use of the `.xcode-version` file.
|
4327
4327
|
Using the `strict` parameter, you can either verify the full set of version numbers strictly (i.e. `11.3.1`) or only a subset of them (i.e. `11.3` or `11`).
|
4328
4328
|
*/
|
4329
4329
|
public func ensureXcodeVersion(version: OptionalConfigValue<String?> = .fastlaneDefault(nil),
|
@@ -8536,8 +8536,8 @@ public func rubyVersion() {
|
|
8536
8536
|
- project: Path to the project file
|
8537
8537
|
- packagePath: Path to the Swift Package
|
8538
8538
|
- scheme: The project's scheme. Make sure it's marked as `Shared`
|
8539
|
-
- device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
|
8540
|
-
- devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
|
8539
|
+
- device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6' or 'iPhone SE (2nd generation) (14.5)')
|
8540
|
+
- devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air', 'iPhone SE (2nd generation) (14.5)'])
|
8541
8541
|
- skipDetectDevices: Should skip auto detecting of devices if none were specified
|
8542
8542
|
- ensureDevicesFound: Should fail if devices not found
|
8543
8543
|
- forceQuitSimulator: Enabling this option will automatically killall Simulator processes before the run
|
@@ -8941,8 +8941,8 @@ public func say(text: [String],
|
|
8941
8941
|
- project: Path to the project file
|
8942
8942
|
- packagePath: Path to the Swift Package
|
8943
8943
|
- scheme: The project's scheme. Make sure it's marked as `Shared`
|
8944
|
-
- device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
|
8945
|
-
- devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
|
8944
|
+
- device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6' or 'iPhone SE (2nd generation) (14.5)')
|
8945
|
+
- devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air', 'iPhone SE (2nd generation) (14.5)'])
|
8946
8946
|
- skipDetectDevices: Should skip auto detecting of devices if none were specified
|
8947
8947
|
- ensureDevicesFound: Should fail if devices not found
|
8948
8948
|
- forceQuitSimulator: Enabling this option will automatically killall Simulator processes before the run
|
@@ -11549,6 +11549,7 @@ public func updateAppIdentifier(xcodeproj: String,
|
|
11549
11549
|
- targets: Specify targets you want to toggle the signing mech. (default to all targets)
|
11550
11550
|
- buildConfigurations: Specify build_configurations you want to toggle the signing mech. (default to all configurations)
|
11551
11551
|
- codeSignIdentity: Code signing identity type (iPhone Developer, iPhone Distribution)
|
11552
|
+
- entitlementsFilePath: Path to your entitlements file
|
11552
11553
|
- profileName: Provisioning profile name to use for code signing
|
11553
11554
|
- profileUuid: Provisioning profile UUID to use for code signing
|
11554
11555
|
- bundleIdentifier: Application Product Bundle Identifier
|
@@ -11563,6 +11564,7 @@ public func updateCodeSigningSettings(path: String,
|
|
11563
11564
|
targets: OptionalConfigValue<[String]?> = .fastlaneDefault(nil),
|
11564
11565
|
buildConfigurations: OptionalConfigValue<[String]?> = .fastlaneDefault(nil),
|
11565
11566
|
codeSignIdentity: OptionalConfigValue<String?> = .fastlaneDefault(nil),
|
11567
|
+
entitlementsFilePath: OptionalConfigValue<String?> = .fastlaneDefault(nil),
|
11566
11568
|
profileName: OptionalConfigValue<String?> = .fastlaneDefault(nil),
|
11567
11569
|
profileUuid: OptionalConfigValue<String?> = .fastlaneDefault(nil),
|
11568
11570
|
bundleIdentifier: OptionalConfigValue<String?> = .fastlaneDefault(nil))
|
@@ -11573,6 +11575,7 @@ public func updateCodeSigningSettings(path: String,
|
|
11573
11575
|
let targetsArg = targets.asRubyArgument(name: "targets", type: nil)
|
11574
11576
|
let buildConfigurationsArg = buildConfigurations.asRubyArgument(name: "build_configurations", type: nil)
|
11575
11577
|
let codeSignIdentityArg = codeSignIdentity.asRubyArgument(name: "code_sign_identity", type: nil)
|
11578
|
+
let entitlementsFilePathArg = entitlementsFilePath.asRubyArgument(name: "entitlements_file_path", type: nil)
|
11576
11579
|
let profileNameArg = profileName.asRubyArgument(name: "profile_name", type: nil)
|
11577
11580
|
let profileUuidArg = profileUuid.asRubyArgument(name: "profile_uuid", type: nil)
|
11578
11581
|
let bundleIdentifierArg = bundleIdentifier.asRubyArgument(name: "bundle_identifier", type: nil)
|
@@ -11582,6 +11585,7 @@ public func updateCodeSigningSettings(path: String,
|
|
11582
11585
|
targetsArg,
|
11583
11586
|
buildConfigurationsArg,
|
11584
11587
|
codeSignIdentityArg,
|
11588
|
+
entitlementsFilePathArg,
|
11585
11589
|
profileNameArg,
|
11586
11590
|
profileUuidArg,
|
11587
11591
|
bundleIdentifierArg]
|
@@ -13174,6 +13178,7 @@ public func xctool() {
|
|
13174
13178
|
- parameter version: The version of Xcode to select specified as a Gem::Version requirement string (e.g. '~> 7.1.0')
|
13175
13179
|
|
13176
13180
|
Finds and selects a version of an installed Xcode that best matches the provided [`Gem::Version` requirement specifier](http://www.rubydoc.info/github/rubygems/rubygems/Gem/Version)
|
13181
|
+
You can either manually provide a specific version using `version:` or you make use of the `.xcode-version` file.
|
13177
13182
|
*/
|
13178
13183
|
public func xcversion(version: String) {
|
13179
13184
|
let versionArg = RubyCommand.Argument(name: "version", value: version, type: nil)
|
@@ -13272,14 +13277,14 @@ func parseInt(fromString: String, function: String = #function) -> Int {
|
|
13272
13277
|
return NSString(string: fromString.trimmingCharacters(in: .punctuationCharacters)).integerValue
|
13273
13278
|
}
|
13274
13279
|
|
13275
|
-
public let deliverfile =
|
13276
|
-
public let gymfile =
|
13277
|
-
public let matchfile =
|
13278
|
-
public let precheckfile =
|
13279
|
-
public let scanfile =
|
13280
|
-
public let screengrabfile =
|
13281
|
-
public let snapshotfile =
|
13280
|
+
public let deliverfile: Deliverfile = .init()
|
13281
|
+
public let gymfile: Gymfile = .init()
|
13282
|
+
public let matchfile: Matchfile = .init()
|
13283
|
+
public let precheckfile: Precheckfile = .init()
|
13284
|
+
public let scanfile: Scanfile = .init()
|
13285
|
+
public let screengrabfile: Screengrabfile = .init()
|
13286
|
+
public let snapshotfile: Snapshotfile = .init()
|
13282
13287
|
|
13283
13288
|
// Please don't remove the lines below
|
13284
13289
|
// They are used to detect outdated files
|
13285
|
-
// FastlaneRunnerAPIVersion [0.9.
|
13290
|
+
// FastlaneRunnerAPIVersion [0.9.142]
|
data/fastlane/swift/Runner.swift
CHANGED
@@ -10,13 +10,9 @@
|
|
10
10
|
|
11
11
|
import Foundation
|
12
12
|
|
13
|
-
let logger: Logger =
|
14
|
-
Logger()
|
15
|
-
}()
|
13
|
+
let logger: Logger = .init()
|
16
14
|
|
17
|
-
let runner: Runner =
|
18
|
-
Runner()
|
19
|
-
}()
|
15
|
+
let runner: Runner = .init()
|
20
16
|
|
21
17
|
func desc(_: String) {
|
22
18
|
// no-op, this is handled in fastlane/lane_list.rb
|
@@ -71,7 +67,7 @@ class Runner {
|
|
71
67
|
|
72
68
|
let runLoop = RunLoop.current
|
73
69
|
let timeoutDate = Date(timeInterval: TimeInterval(timeout), since: Date())
|
74
|
-
var fulfilled
|
70
|
+
var fulfilled = false
|
75
71
|
let _expression = memoizedClosure(expression)
|
76
72
|
repeat {
|
77
73
|
do {
|
@@ -14,10 +14,10 @@ public protocol ScanfileProtocol: class {
|
|
14
14
|
/// The project's scheme. Make sure it's marked as `Shared`
|
15
15
|
var scheme: String? { get }
|
16
16
|
|
17
|
-
/// The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
|
17
|
+
/// The name of the simulator type you want to run tests on (e.g. 'iPhone 6' or 'iPhone SE (2nd generation) (14.5)')
|
18
18
|
var device: String? { get }
|
19
19
|
|
20
|
-
/// Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
|
20
|
+
/// Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air', 'iPhone SE (2nd generation) (14.5)'])
|
21
21
|
var devices: [String]? { get }
|
22
22
|
|
23
23
|
/// Should skip auto detecting of devices if none were specified
|
@@ -296,4 +296,4 @@ public extension ScanfileProtocol {
|
|
296
296
|
|
297
297
|
// Please don't remove the lines below
|
298
298
|
// They are used to detect outdated files
|
299
|
-
// FastlaneRunnerAPIVersion [0.9.
|
299
|
+
// FastlaneRunnerAPIVersion [0.9.97]
|
@@ -2,35 +2,35 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.49.1",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"root_url": "https://ghcr.io/v2/homebrew/core",
|
9
9
|
"files": {
|
10
10
|
"arm64_monterey": {
|
11
11
|
"cellar": ":any_skip_relocation",
|
12
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
13
|
-
"sha256": "
|
12
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c43caffb4d2cf9546b0a8fa732ffe5d95b1b1fd7ab03f1c5da39c8e7a0e8ecb4",
|
13
|
+
"sha256": "c43caffb4d2cf9546b0a8fa732ffe5d95b1b1fd7ab03f1c5da39c8e7a0e8ecb4"
|
14
14
|
},
|
15
15
|
"arm64_big_sur": {
|
16
16
|
"cellar": ":any_skip_relocation",
|
17
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
18
|
-
"sha256": "
|
17
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:ad0ce5fc15fe1d339d366ece18694fdc1d14021684462a126ed20b537a1a9bf5",
|
18
|
+
"sha256": "ad0ce5fc15fe1d339d366ece18694fdc1d14021684462a126ed20b537a1a9bf5"
|
19
19
|
},
|
20
20
|
"monterey": {
|
21
21
|
"cellar": ":any_skip_relocation",
|
22
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
23
|
-
"sha256": "
|
22
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:33652b8015d31dbe45e00bdc598f1b228cb63c7083b90137fdec66318a88010f",
|
23
|
+
"sha256": "33652b8015d31dbe45e00bdc598f1b228cb63c7083b90137fdec66318a88010f"
|
24
24
|
},
|
25
25
|
"big_sur": {
|
26
26
|
"cellar": ":any_skip_relocation",
|
27
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
28
|
-
"sha256": "
|
27
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:f0ad88e5594a6a3e5a35834a9a22473a05511375942dbb046d1085cc537d60b8",
|
28
|
+
"sha256": "f0ad88e5594a6a3e5a35834a9a22473a05511375942dbb046d1085cc537d60b8"
|
29
29
|
},
|
30
30
|
"catalina": {
|
31
31
|
"cellar": ":any_skip_relocation",
|
32
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
33
|
-
"sha256": "
|
32
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:564f5daf9cd82407843aed590bd4190f3e5aaa73a30b3bc8ae07135f1319ac97",
|
33
|
+
"sha256": "564f5daf9cd82407843aed590bd4190f3e5aaa73a30b3bc8ae07135f1319ac97"
|
34
34
|
}
|
35
35
|
}
|
36
36
|
}
|
@@ -56,9 +56,9 @@
|
|
56
56
|
"macOS": "11.6"
|
57
57
|
},
|
58
58
|
"monterey": {
|
59
|
-
"HOMEBREW_VERSION": "3.3.
|
59
|
+
"HOMEBREW_VERSION": "3.3.7-38-g6295b08",
|
60
60
|
"HOMEBREW_PREFIX": "/opt/homebrew",
|
61
|
-
"Homebrew/homebrew-core": "
|
61
|
+
"Homebrew/homebrew-core": "e340d22f5ef83cf4acc489b34e2478426dbf53b9",
|
62
62
|
"CLT": "13.1.0.0.1.1633545042",
|
63
63
|
"Xcode": "13.1",
|
64
64
|
"macOS": "12.0.1"
|
data/scan/lib/scan/options.rb
CHANGED
@@ -60,7 +60,7 @@ module Scan
|
|
60
60
|
optional: true,
|
61
61
|
is_string: true,
|
62
62
|
env_name: "SCAN_DEVICE",
|
63
|
-
description: "The name of the simulator type you want to run tests on (e.g. 'iPhone 6')",
|
63
|
+
description: "The name of the simulator type you want to run tests on (e.g. 'iPhone 6' or 'iPhone SE (2nd generation) (14.5)')",
|
64
64
|
conflicting_options: [:devices],
|
65
65
|
conflict_block: proc do |value|
|
66
66
|
UI.user_error!("You can't use 'device' and 'devices' options in one run")
|
@@ -70,7 +70,7 @@ module Scan
|
|
70
70
|
is_string: false,
|
71
71
|
env_name: "SCAN_DEVICES",
|
72
72
|
type: Array,
|
73
|
-
description: "Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])",
|
73
|
+
description: "Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air', 'iPhone SE (2nd generation) (14.5)'])",
|
74
74
|
conflicting_options: [:device],
|
75
75
|
conflict_block: proc do |value|
|
76
76
|
UI.user_error!("You can't use 'device' and 'devices' options in one run")
|
@@ -123,7 +123,7 @@ module Snapshot
|
|
123
123
|
# Simulator could stil be booting with Apple logo
|
124
124
|
# Need to wait "some amount of time" until home screen shows
|
125
125
|
boot_sleep = ENV["SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT"].to_i || 10
|
126
|
-
UI.message("Waiting #{boot_sleep} seconds for device to fully boot before overriding status bar... Set 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT'
|
126
|
+
UI.message("Waiting #{boot_sleep} seconds for device to fully boot before overriding status bar... Set 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT' environment variable to adjust timeout")
|
127
127
|
sleep(boot_sleep) if boot_sleep > 0
|
128
128
|
|
129
129
|
UI.message("Overriding Status Bar")
|
@@ -391,10 +391,11 @@ module Spaceship
|
|
391
391
|
|
392
392
|
keychain_entry = CredentialsManager::AccountManager.new(user: user, password: password)
|
393
393
|
user ||= keychain_entry.user
|
394
|
-
password = keychain_entry.password
|
394
|
+
password = keychain_entry.password(ask_if_missing: !Spaceship::Globals.check_session)
|
395
395
|
end
|
396
396
|
|
397
397
|
if user.to_s.strip.empty? || password.to_s.strip.empty?
|
398
|
+
exit_with_session_state(user, false) if Spaceship::Globals.check_session
|
398
399
|
raise NoUserCredentialsError.new, "No login data provided"
|
399
400
|
end
|
400
401
|
|
@@ -413,21 +414,16 @@ module Spaceship
|
|
413
414
|
end
|
414
415
|
end
|
415
416
|
|
416
|
-
#
|
417
|
-
# This will also handle 2 step verification and 2 factor authentication
|
417
|
+
# Check if we have a cached/valid session
|
418
418
|
#
|
419
|
-
#
|
420
|
-
#
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
# lane (e.g. call match 5 times), this would lock you out of the account for a while.
|
428
|
-
# By loading existing sessions and checking if they're valid, we're sending less login requests.
|
429
|
-
# More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108
|
430
|
-
#
|
419
|
+
# Background:
|
420
|
+
# December 4th 2017 Apple introduced a rate limit - which is of course fine by itself -
|
421
|
+
# but unfortunately also rate limits successful logins. If you call multiple tools in a
|
422
|
+
# lane (e.g. call match 5 times), this would lock you out of the account for a while.
|
423
|
+
# By loading existing sessions and checking if they're valid, we're sending less login requests.
|
424
|
+
# More context on why this change was necessary https://github.com/fastlane/fastlane/pull/11108
|
425
|
+
#
|
426
|
+
def has_valid_session
|
431
427
|
# If there was a successful manual login before, we have a session on disk
|
432
428
|
if load_session_from_file
|
433
429
|
# Check if the session is still valid here
|
@@ -462,6 +458,23 @@ module Spaceship
|
|
462
458
|
#
|
463
459
|
# After this point, we sure have no valid session any more and have to create a new one
|
464
460
|
#
|
461
|
+
return false
|
462
|
+
end
|
463
|
+
|
464
|
+
# This method is used for both the Apple Dev Portal and App Store Connect
|
465
|
+
# This will also handle 2 step verification and 2 factor authentication
|
466
|
+
#
|
467
|
+
# It is called in `send_login_request` of sub classes (which the method `login`, above, transferred over to via `do_login`)
|
468
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
469
|
+
def send_shared_login_request(user, password)
|
470
|
+
# Check if the cache or FASTLANE_SESSION is still valid
|
471
|
+
has_valid_session = self.has_valid_session
|
472
|
+
|
473
|
+
# Exit if `--check_session` flag was passed
|
474
|
+
exit_with_session_state(user, has_valid_session) if Spaceship::Globals.check_session
|
475
|
+
|
476
|
+
# If the session is valid no need to attempt to generate a new one.
|
477
|
+
return true if has_valid_session
|
465
478
|
|
466
479
|
data = {
|
467
480
|
accountName: user,
|
@@ -566,6 +579,13 @@ module Spaceship
|
|
566
579
|
return false
|
567
580
|
end
|
568
581
|
|
582
|
+
# This method is used to log if the session is valid or not and then exit
|
583
|
+
# It is called when the `--check_session` flag is passed
|
584
|
+
def exit_with_session_state(user, has_valid_session)
|
585
|
+
puts("#{has_valid_session ? 'Valid' : 'No valid'} session found (#{user}). Exiting.")
|
586
|
+
exit(has_valid_session)
|
587
|
+
end
|
588
|
+
|
569
589
|
def itc_service_key
|
570
590
|
return @service_key if @service_key
|
571
591
|
|
@@ -41,7 +41,7 @@ module Spaceship
|
|
41
41
|
c.syntax = 'fastlane spaceship spaceauth'
|
42
42
|
c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'
|
43
43
|
c.option('--copy_to_clipboard', 'Whether the session string should be copied to clipboard. For more info see https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth`')
|
44
|
-
|
44
|
+
c.option('--check_session', 'Check to see if there is a valid session (either in the cache or via FASTLANE_SESSION). Sets the exit code to 0 if the session is valid or 1 if not.') { Spaceship::Globals.check_session = true }
|
45
45
|
c.action do |args, options|
|
46
46
|
Spaceship::SpaceauthRunner.new(username: options.user, copy_to_clipboard: options.copy_to_clipboard).run
|
47
47
|
end
|
@@ -64,6 +64,19 @@ module Spaceship
|
|
64
64
|
yield(model)
|
65
65
|
end
|
66
66
|
end
|
67
|
+
|
68
|
+
def all_pages_each(&block)
|
69
|
+
to_models.each do |model|
|
70
|
+
yield(model)
|
71
|
+
end
|
72
|
+
|
73
|
+
resp = self
|
74
|
+
loop do
|
75
|
+
resp = resp.next_page
|
76
|
+
break if resp.nil?
|
77
|
+
resp.each(&block)
|
78
|
+
end
|
79
|
+
end
|
67
80
|
end
|
68
81
|
end
|
69
82
|
end
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module Spaceship
|
2
2
|
class Globals
|
3
|
+
class << self
|
4
|
+
attr_writer(:check_session)
|
5
|
+
end
|
6
|
+
|
3
7
|
# if spaceship is run with a FastlaneCore available respect the global state there
|
4
8
|
# otherwise fallback to $verbose
|
5
9
|
def self.verbose?
|
@@ -8,5 +12,10 @@ module Spaceship
|
|
8
12
|
end
|
9
13
|
return $verbose
|
10
14
|
end
|
15
|
+
|
16
|
+
# if spaceship is run with the --check_session flag this value will be set to true
|
17
|
+
def self.check_session
|
18
|
+
return @check_session
|
19
|
+
end
|
11
20
|
end
|
12
21
|
end
|
@@ -16,7 +16,7 @@ module Spaceship
|
|
16
16
|
|
17
17
|
def run
|
18
18
|
begin
|
19
|
-
puts("Logging into to App Store Connect (#{@username})...")
|
19
|
+
puts("Logging into to App Store Connect (#{@username})...") unless Spaceship::Globals.check_session
|
20
20
|
Spaceship::Tunes.login(@username)
|
21
21
|
puts("Successfully logged in to App Store Connect".green)
|
22
22
|
puts("")
|
Binary file
|
metadata
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.199.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Daniel Jankowski
|
8
|
-
- Helmut Januschka
|
9
|
-
- Aaron Brager
|
10
|
-
- Felix Krause
|
11
|
-
- Joshua Liebowitz
|
12
|
-
- Andrew McBurney
|
13
|
-
- Satoshi Namai
|
14
7
|
- Iulian Onofrei
|
15
|
-
- Max Ott
|
16
8
|
- Fumiya Nakamura
|
17
|
-
-
|
18
|
-
- Kohki Miki
|
19
|
-
- Manish Rathi
|
9
|
+
- Aaron Brager
|
20
10
|
- Olivier Halligon
|
21
|
-
-
|
11
|
+
- Helmut Januschka
|
22
12
|
- Manu Wallner
|
13
|
+
- Luka Mirosevic
|
14
|
+
- Jérôme Lacoste
|
15
|
+
- Jimmy Dee
|
16
|
+
- Felix Krause
|
17
|
+
- Maksym Grebenets
|
18
|
+
- Daniel Jankowski
|
19
|
+
- Danielle Tomlinson
|
20
|
+
- Satoshi Namai
|
23
21
|
- Matthew Ellis
|
24
22
|
- Roger Oba
|
23
|
+
- Manish Rathi
|
24
|
+
- Jorge Revuelta H
|
25
25
|
- Josh Holtz
|
26
|
+
- Joshua Liebowitz
|
27
|
+
- Kohki Miki
|
28
|
+
- Max Ott
|
29
|
+
- Andrew McBurney
|
26
30
|
- Jan Piotrowski
|
27
|
-
-
|
28
|
-
- Danielle Tomlinson
|
29
|
-
- Maksym Grebenets
|
30
|
-
- Jérôme Lacoste
|
31
|
-
- Jorge Revuelta H
|
31
|
+
- Stefan Natchev
|
32
32
|
autorequire:
|
33
33
|
bindir: bin
|
34
34
|
cert_chain: []
|
35
|
-
date: 2021-
|
35
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: xcodeproj
|
@@ -993,6 +993,7 @@ files:
|
|
993
993
|
- deliver/lib/deliver/upload_price_tier.rb
|
994
994
|
- deliver/lib/deliver/upload_screenshots.rb
|
995
995
|
- fastlane/README.md
|
996
|
+
- fastlane/lib/.DS_Store
|
996
997
|
- fastlane/lib/assets/ActionDetails.md.erb
|
997
998
|
- fastlane/lib/assets/Actions.md.erb
|
998
999
|
- fastlane/lib/assets/AppfileTemplate
|
@@ -1011,8 +1012,10 @@ files:
|
|
1011
1012
|
- fastlane/lib/assets/s3_plist_template.erb
|
1012
1013
|
- fastlane/lib/assets/s3_version_template.erb
|
1013
1014
|
- fastlane/lib/fastlane.rb
|
1015
|
+
- fastlane/lib/fastlane/.DS_Store
|
1014
1016
|
- fastlane/lib/fastlane/action.rb
|
1015
1017
|
- fastlane/lib/fastlane/action_collector.rb
|
1018
|
+
- fastlane/lib/fastlane/actions/.DS_Store
|
1016
1019
|
- fastlane/lib/fastlane/actions/README.md
|
1017
1020
|
- fastlane/lib/fastlane/actions/actions_helper.rb
|
1018
1021
|
- fastlane/lib/fastlane/actions/adb.rb
|
@@ -1836,6 +1839,7 @@ files:
|
|
1836
1839
|
- supply/lib/supply/release_listing.rb
|
1837
1840
|
- supply/lib/supply/setup.rb
|
1838
1841
|
- supply/lib/supply/uploader.rb
|
1842
|
+
- trainer/lib/.DS_Store
|
1839
1843
|
homepage: https://fastlane.tools
|
1840
1844
|
licenses:
|
1841
1845
|
- MIT
|
@@ -1866,6 +1870,7 @@ require_paths:
|
|
1866
1870
|
- snapshot/lib
|
1867
1871
|
- spaceship/lib
|
1868
1872
|
- supply/lib
|
1873
|
+
- trainer/lib
|
1869
1874
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1870
1875
|
requirements:
|
1871
1876
|
- - ">="
|