fastlane 2.157.3 → 2.161.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +72 -72
- data/deliver/lib/deliver/options.rb +17 -1
- data/deliver/lib/deliver/runner.rb +36 -5
- data/deliver/lib/deliver/upload_metadata.rb +36 -6
- data/deliver/lib/deliver/upload_price_tier.rb +7 -2
- data/{pilot/lib/pilot/.manager.rb.swp → fastlane/lib/fastlane/.erb_template_helper.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/{.ensure_git_status_clean.rb.swp → .git_commit.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +20 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -0
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +6 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +1 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +3 -2
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +3 -3
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +2 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +34 -7
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +13 -2
- data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -0
- data/fastlane/lib/fastlane/helper/git_helper.rb +2 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +6 -4
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +2 -1
- data/fastlane/swift/Appfile.swift +2 -4
- data/fastlane/swift/ArgumentProcessor.swift +2 -6
- data/fastlane/swift/ControlCommand.swift +2 -5
- data/fastlane/swift/Deliverfile.swift +5 -2
- data/fastlane/swift/DeliverfileProtocol.swift +15 -4
- data/fastlane/swift/Fastfile.swift +5 -1
- data/fastlane/swift/Fastlane.swift +2285 -2240
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +5 -5
- data/fastlane/swift/Gymfile.swift +5 -2
- data/fastlane/swift/GymfileProtocol.swift +6 -3
- data/fastlane/swift/LaneFileProtocol.swift +42 -29
- data/fastlane/swift/MainProcess.swift +77 -0
- data/fastlane/swift/Matchfile.swift +5 -2
- data/fastlane/swift/MatchfileProtocol.swift +7 -4
- data/fastlane/swift/Plugins.swift +2 -1
- data/fastlane/swift/Precheckfile.swift +5 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +18 -3
- data/fastlane/swift/RubyCommand.swift +2 -6
- data/fastlane/swift/RubyCommandable.swift +2 -6
- data/fastlane/swift/Runner.swift +5 -9
- data/fastlane/swift/RunnerArgument.swift +2 -6
- data/fastlane/swift/Scanfile.swift +5 -2
- data/fastlane/swift/ScanfileProtocol.swift +6 -3
- data/fastlane/swift/Screengrabfile.swift +5 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +6 -3
- data/fastlane/swift/Snapshotfile.swift +5 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +6 -3
- data/fastlane/swift/SocketClient.swift +3 -7
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -6
- data/fastlane/swift/SocketResponse.swift +2 -6
- data/fastlane/swift/formatting/Brewfile.lock.json +18 -10
- data/fastlane/swift/main.swift +4 -8
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/frameit/lib/frameit/editor.rb +1 -0
- data/match/lib/match/importer.rb +5 -2
- data/match/lib/match/options.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +3 -3
- data/pilot/lib/pilot/options.rb +2 -2
- data/precheck/lib/precheck/options.rb +25 -0
- data/precheck/lib/precheck/rule_processor.rb +94 -60
- data/precheck/lib/precheck/runner.rb +26 -5
- data/produce/lib/produce/itunes_connect.rb +2 -0
- data/sigh/lib/sigh/runner.rb +2 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +17 -2
- data/spaceship/README.md +1 -1
- data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +34 -13
- data/{fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp → spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp} +0 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +17 -9
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +3 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +3 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +21 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +29 -9
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +11 -5
- metadata +24 -26
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04dd428b80beb70de6d4aa2f7e0348b4e0c0e1d4aa0e781c311ab18e44d0de5
|
4
|
+
data.tar.gz: fe4342a1c8d7df3e617c111e37bd3cab7c7b3675875f8bd384917f0cafb1a221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ad358398a4033fe329a06934cee91566dd29c084a0e0e62a86148c0e2b456be46ce008de0b921a68b9d2ffbb3ec11d97a41a286d33cac395d3e4c37ac01adce
|
7
|
+
data.tar.gz: 3d5fbd2690e8dafe1efc9fd4a6d63e711b3569b071d00d39b82e078a5c038c6110df73234d0e15ecc03c7f2792253edea430d6e716c460a7d8c9d371deed0dd0
|
data/README.md
CHANGED
@@ -34,23 +34,23 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
34
34
|
<!-- This table is regenerated and resorted on each release -->
|
35
35
|
<table id='team'>
|
36
36
|
<tr>
|
37
|
-
<td id='
|
38
|
-
<a href='https://github.com/
|
39
|
-
<img src='https://github.com/
|
37
|
+
<td id='stefan-natchev'>
|
38
|
+
<a href='https://github.com/snatchev'>
|
39
|
+
<img src='https://github.com/snatchev.png?size=140'>
|
40
40
|
</a>
|
41
|
-
<h4 align='center'><a href='https://twitter.com/
|
41
|
+
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
42
42
|
</td>
|
43
|
-
<td id='
|
44
|
-
<a href='https://github.com/
|
45
|
-
<img src='https://github.com/
|
43
|
+
<td id='jorge-revuelta-h'>
|
44
|
+
<a href='https://github.com/minuscorp'>
|
45
|
+
<img src='https://github.com/minuscorp.png?size=140'>
|
46
46
|
</a>
|
47
|
-
<h4 align='center'><a href='https://twitter.com/
|
47
|
+
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
48
48
|
</td>
|
49
|
-
<td id='
|
50
|
-
<a href='https://github.com/
|
51
|
-
<img src='https://github.com/
|
49
|
+
<td id='olivier-halligon'>
|
50
|
+
<a href='https://github.com/AliSoftware'>
|
51
|
+
<img src='https://github.com/AliSoftware.png?size=140'>
|
52
52
|
</a>
|
53
|
-
<h4 align='center'><a href='https://twitter.com/
|
53
|
+
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
54
54
|
</td>
|
55
55
|
<td id='fumiya-nakamura'>
|
56
56
|
<a href='https://github.com/nafu'>
|
@@ -58,37 +58,19 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
58
58
|
</a>
|
59
59
|
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
60
60
|
</td>
|
61
|
-
<td id='
|
62
|
-
<a href='https://github.com/
|
63
|
-
<img src='https://github.com/
|
61
|
+
<td id='matthew-ellis'>
|
62
|
+
<a href='https://github.com/matthewellis'>
|
63
|
+
<img src='https://github.com/matthewellis.png?size=140'>
|
64
64
|
</a>
|
65
|
-
<h4 align='center'><a href='https://twitter.com/
|
65
|
+
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
66
66
|
</td>
|
67
67
|
</tr>
|
68
68
|
<tr>
|
69
|
-
<td id='
|
70
|
-
<a href='https://github.com/
|
71
|
-
<img src='https://github.com/
|
72
|
-
</a>
|
73
|
-
<h4 align='center'>Jimmy Dee</h4>
|
74
|
-
</td>
|
75
|
-
<td id='olivier-halligon'>
|
76
|
-
<a href='https://github.com/AliSoftware'>
|
77
|
-
<img src='https://github.com/AliSoftware.png?size=140'>
|
78
|
-
</a>
|
79
|
-
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
80
|
-
</td>
|
81
|
-
<td id='jan-piotrowski'>
|
82
|
-
<a href='https://github.com/janpio'>
|
83
|
-
<img src='https://github.com/janpio.png?size=140'>
|
84
|
-
</a>
|
85
|
-
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
86
|
-
</td>
|
87
|
-
<td id='maksym-grebenets'>
|
88
|
-
<a href='https://github.com/mgrebenets'>
|
89
|
-
<img src='https://github.com/mgrebenets.png?size=140'>
|
69
|
+
<td id='aaron-brager'>
|
70
|
+
<a href='https://github.com/getaaron'>
|
71
|
+
<img src='https://github.com/getaaron.png?size=140'>
|
90
72
|
</a>
|
91
|
-
<h4 align='center'><a href='https://twitter.com/
|
73
|
+
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
92
74
|
</td>
|
93
75
|
<td id='max-ott'>
|
94
76
|
<a href='https://github.com/max-ott'>
|
@@ -96,8 +78,6 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
96
78
|
</a>
|
97
79
|
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
98
80
|
</td>
|
99
|
-
</tr>
|
100
|
-
<tr>
|
101
81
|
<td id='felix-krause'>
|
102
82
|
<a href='https://github.com/KrauseFx'>
|
103
83
|
<img src='https://github.com/KrauseFx.png?size=140'>
|
@@ -110,43 +90,57 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
110
90
|
</a>
|
111
91
|
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
112
92
|
</td>
|
113
|
-
<td id='josh-holtz'>
|
114
|
-
<a href='https://github.com/joshdholtz'>
|
115
|
-
<img src='https://github.com/joshdholtz.png?size=140'>
|
116
|
-
</a>
|
117
|
-
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
118
|
-
</td>
|
119
93
|
<td id='manu-wallner'>
|
120
94
|
<a href='https://github.com/milch'>
|
121
95
|
<img src='https://github.com/milch.png?size=140'>
|
122
96
|
</a>
|
123
97
|
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
124
98
|
</td>
|
99
|
+
</tr>
|
100
|
+
<tr>
|
125
101
|
<td id='iulian-onofrei'>
|
126
102
|
<a href='https://github.com/revolter'>
|
127
103
|
<img src='https://github.com/revolter.png?size=140'>
|
128
104
|
</a>
|
129
105
|
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
130
106
|
</td>
|
131
|
-
|
132
|
-
<
|
133
|
-
<
|
134
|
-
<a href='https://github.com/mollyIV'>
|
135
|
-
<img src='https://github.com/mollyIV.png?size=140'>
|
107
|
+
<td id='jimmy-dee'>
|
108
|
+
<a href='https://github.com/jdee'>
|
109
|
+
<img src='https://github.com/jdee.png?size=140'>
|
136
110
|
</a>
|
137
|
-
<h4 align='center'
|
111
|
+
<h4 align='center'>Jimmy Dee</h4>
|
138
112
|
</td>
|
139
|
-
<td id='
|
140
|
-
<a href='https://github.com/
|
141
|
-
<img src='https://github.com/
|
113
|
+
<td id='andrew-mcburney'>
|
114
|
+
<a href='https://github.com/armcburney'>
|
115
|
+
<img src='https://github.com/armcburney.png?size=140'>
|
142
116
|
</a>
|
143
|
-
<h4 align='center'><a href='https://twitter.com/
|
117
|
+
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
144
118
|
</td>
|
145
|
-
<td id='
|
146
|
-
<a href='https://github.com/
|
147
|
-
<img src='https://github.com/
|
119
|
+
<td id='maksym-grebenets'>
|
120
|
+
<a href='https://github.com/mgrebenets'>
|
121
|
+
<img src='https://github.com/mgrebenets.png?size=140'>
|
148
122
|
</a>
|
149
|
-
<h4 align='center'><a href='https://twitter.com/
|
123
|
+
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
124
|
+
</td>
|
125
|
+
<td id='josh-holtz'>
|
126
|
+
<a href='https://github.com/joshdholtz'>
|
127
|
+
<img src='https://github.com/joshdholtz.png?size=140'>
|
128
|
+
</a>
|
129
|
+
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
130
|
+
</td>
|
131
|
+
</tr>
|
132
|
+
<tr>
|
133
|
+
<td id='jan-piotrowski'>
|
134
|
+
<a href='https://github.com/janpio'>
|
135
|
+
<img src='https://github.com/janpio.png?size=140'>
|
136
|
+
</a>
|
137
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
138
|
+
</td>
|
139
|
+
<td id='danielle-tomlinson'>
|
140
|
+
<a href='https://github.com/endocrimes'>
|
141
|
+
<img src='https://github.com/endocrimes.png?size=140'>
|
142
|
+
</a>
|
143
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
150
144
|
</td>
|
151
145
|
<td id='kohki-miki'>
|
152
146
|
<a href='https://github.com/giginet'>
|
@@ -154,25 +148,31 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
154
148
|
</a>
|
155
149
|
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
156
150
|
</td>
|
157
|
-
<td id='
|
158
|
-
<a href='https://github.com/
|
159
|
-
<img src='https://github.com/
|
151
|
+
<td id='helmut-januschka'>
|
152
|
+
<a href='https://github.com/hjanuschka'>
|
153
|
+
<img src='https://github.com/hjanuschka.png?size=140'>
|
160
154
|
</a>
|
161
|
-
<h4 align='center'><a href='https://twitter.com/
|
155
|
+
<h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
|
156
|
+
</td>
|
157
|
+
<td id='jérôme-lacoste'>
|
158
|
+
<a href='https://github.com/lacostej'>
|
159
|
+
<img src='https://github.com/lacostej.png?size=140'>
|
160
|
+
</a>
|
161
|
+
<h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
|
162
162
|
</td>
|
163
163
|
</tr>
|
164
164
|
<tr>
|
165
|
-
<td id='
|
166
|
-
<a href='https://github.com/
|
167
|
-
<img src='https://github.com/
|
165
|
+
<td id='daniel-jankowski'>
|
166
|
+
<a href='https://github.com/mollyIV'>
|
167
|
+
<img src='https://github.com/mollyIV.png?size=140'>
|
168
168
|
</a>
|
169
|
-
<h4 align='center'><a href='https://twitter.com/
|
169
|
+
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
170
170
|
</td>
|
171
|
-
<td id='
|
172
|
-
<a href='https://github.com/
|
173
|
-
<img src='https://github.com/
|
171
|
+
<td id='joshua-liebowitz'>
|
172
|
+
<a href='https://github.com/taquitos'>
|
173
|
+
<img src='https://github.com/taquitos.png?size=140'>
|
174
174
|
</a>
|
175
|
-
<h4 align='center'><a href='https://twitter.com/
|
175
|
+
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
176
176
|
</td>
|
177
177
|
</table>
|
178
178
|
|
@@ -12,6 +12,22 @@ module Deliver
|
|
12
12
|
user ||= ENV["DELIVER_USER"]
|
13
13
|
|
14
14
|
[
|
15
|
+
FastlaneCore::ConfigItem.new(key: :api_key_path,
|
16
|
+
env_name: "DELIVER_API_KEY_PATH",
|
17
|
+
description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
|
18
|
+
optional: true,
|
19
|
+
conflicting_options: [:username],
|
20
|
+
verify_block: proc do |value|
|
21
|
+
UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
|
22
|
+
end),
|
23
|
+
FastlaneCore::ConfigItem.new(key: :api_key,
|
24
|
+
env_name: "DELIVER_API_KEY",
|
25
|
+
description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
|
26
|
+
type: Hash,
|
27
|
+
optional: true,
|
28
|
+
sensitive: true,
|
29
|
+
conflicting_options: [:api_key_path, :username]),
|
30
|
+
|
15
31
|
FastlaneCore::ConfigItem.new(key: :username,
|
16
32
|
short_option: "-u",
|
17
33
|
env_name: "DELIVER_USERNAME",
|
@@ -129,7 +145,7 @@ module Deliver
|
|
129
145
|
default_value: false),
|
130
146
|
FastlaneCore::ConfigItem.new(key: :skip_app_version_update,
|
131
147
|
env_name: "DELIVER_SKIP_APP_VERSION_UPDATE",
|
132
|
-
description: "Don
|
148
|
+
description: "Don’t create or update the app version that is being prepared for submission",
|
133
149
|
is_string: false,
|
134
150
|
default_value: false),
|
135
151
|
|
@@ -26,9 +26,22 @@ module Deliver
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def login
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
if api_token
|
30
|
+
UI.message("Creating authorization token for App Store Connect API")
|
31
|
+
Spaceship::ConnectAPI.token = api_token
|
32
|
+
else
|
33
|
+
# Team selection passed though FASTLANE_TEAM_ID and FASTLANE_TEAM_NAME environment variables
|
34
|
+
# Prompts select team if multiple teams and none specified
|
35
|
+
UI.message("Login to App Store Connect (#{options[:username]})")
|
36
|
+
Spaceship::ConnectAPI.login(options[:username], nil, use_portal: false, use_tunes: true)
|
37
|
+
UI.message("Login successful")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def api_token
|
42
|
+
@api_token ||= Spaceship::ConnectAPI::Token.create(options[:api_key]) if options[:api_key]
|
43
|
+
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(options[:api_key_path]) if options[:api_key_path]
|
44
|
+
return @api_token
|
32
45
|
end
|
33
46
|
|
34
47
|
def run
|
@@ -65,10 +78,21 @@ module Deliver
|
|
65
78
|
precheck_options = {
|
66
79
|
default_rule_level: options[:precheck_default_rule_level],
|
67
80
|
include_in_app_purchases: options[:precheck_include_in_app_purchases],
|
68
|
-
app_identifier: options[:app_identifier]
|
69
|
-
username: options[:username]
|
81
|
+
app_identifier: options[:app_identifier]
|
70
82
|
}
|
71
83
|
|
84
|
+
if options[:api_key] || options[:api_key_path]
|
85
|
+
if options[:precheck_include_in_app_purchases]
|
86
|
+
UI.user_error!("Precheck cannot check In-app purchases with the App Store Connect API Key (yet). Exclude In-app purchases from precheck or use Apple ID login")
|
87
|
+
end
|
88
|
+
|
89
|
+
precheck_options[:api_key] = options[:api_key]
|
90
|
+
precheck_options[:api_key_path] = options[:api_key_path]
|
91
|
+
else
|
92
|
+
precheck_options[:username] = options[:username]
|
93
|
+
precheck_options[:platform] = options[:platform]
|
94
|
+
end
|
95
|
+
|
72
96
|
precheck_config = FastlaneCore::Configuration.create(Precheck::Options.available_options, precheck_options)
|
73
97
|
Precheck.config = precheck_config
|
74
98
|
|
@@ -172,10 +196,17 @@ module Deliver
|
|
172
196
|
|
173
197
|
private
|
174
198
|
|
199
|
+
# If App Store Connect API token, use token.
|
175
200
|
# If itc_provider was explicitly specified, use it.
|
176
201
|
# If there are multiple teams, infer the provider from the selected team name.
|
177
202
|
# If there are fewer than two teams, don't infer the provider.
|
178
203
|
def transporter_for_selected_team
|
204
|
+
# Use JWT auth
|
205
|
+
unless api_token.nil?
|
206
|
+
api_token.refresh! if api_token.expired?
|
207
|
+
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
|
208
|
+
end
|
209
|
+
|
179
210
|
tunes_client = Spaceship::ConnectAPI.client.tunes_client
|
180
211
|
|
181
212
|
generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
|
@@ -96,7 +96,7 @@ module Deliver
|
|
96
96
|
|
97
97
|
if v.nil?
|
98
98
|
UI.message("Couldn't find live version, editing the current version on App Store Connect instead")
|
99
|
-
version = app
|
99
|
+
version = fetch_edit_app_store_version(app, platform)
|
100
100
|
# we don't want to update the localised_options and non_localised_options
|
101
101
|
# as we also check for `options[:edit_live]` at other areas in the code
|
102
102
|
# by not touching those 2 variables, deliver is more consistent with what the option says
|
@@ -105,13 +105,17 @@ module Deliver
|
|
105
105
|
UI.message("Found live version")
|
106
106
|
end
|
107
107
|
else
|
108
|
-
version = app
|
108
|
+
version = fetch_edit_app_store_version(app, platform)
|
109
109
|
localised_options = (LOCALISED_VERSION_VALUES.keys + LOCALISED_APP_VALUES.keys)
|
110
110
|
non_localised_options = NON_LOCALISED_VERSION_VALUES.keys
|
111
111
|
end
|
112
112
|
|
113
113
|
# Needed for to filter out release notes from being sent up
|
114
|
-
number_of_versions =
|
114
|
+
number_of_versions = Spaceship::ConnectAPI.get_app_store_versions(
|
115
|
+
app_id: app.id,
|
116
|
+
filter: { platform: platform },
|
117
|
+
limit: 2
|
118
|
+
).count
|
115
119
|
is_first_version = number_of_versions == 1
|
116
120
|
UI.verbose("Version '#{version.version_string}' is the first version on App Store Connect") if is_first_version
|
117
121
|
|
@@ -202,7 +206,7 @@ module Deliver
|
|
202
206
|
end
|
203
207
|
|
204
208
|
# Update categories
|
205
|
-
app_info = app
|
209
|
+
app_info = fetch_edit_app_info(app)
|
206
210
|
if app_info
|
207
211
|
category_id_map = {}
|
208
212
|
|
@@ -410,9 +414,35 @@ module Deliver
|
|
410
414
|
.uniq
|
411
415
|
end
|
412
416
|
|
417
|
+
def fetch_edit_app_store_version(app, platform, wait_time: 10)
|
418
|
+
retry_if_nil("Cannot find edit app store version", wait_time: wait_time) do
|
419
|
+
app.get_edit_app_store_version(platform: platform)
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
def fetch_edit_app_info(app, wait_time: 10)
|
424
|
+
retry_if_nil("Cannot find edit app info", wait_time: wait_time) do
|
425
|
+
app.fetch_edit_app_info
|
426
|
+
end
|
427
|
+
end
|
428
|
+
|
429
|
+
def retry_if_nil(message, tries: 5, wait_time: 10)
|
430
|
+
loop do
|
431
|
+
tries -= 1
|
432
|
+
|
433
|
+
value = yield
|
434
|
+
return value if value
|
435
|
+
|
436
|
+
UI.message("#{message}... Retrying after #{wait_time} seconds (remaining: #{tries})")
|
437
|
+
sleep(wait_time)
|
438
|
+
|
439
|
+
return nil if tries.zero?
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
413
443
|
# Finding languages to enable
|
414
444
|
def verify_available_info_languages!(options, app, languages)
|
415
|
-
app_info = app
|
445
|
+
app_info = fetch_edit_app_info(app)
|
416
446
|
|
417
447
|
unless app_info
|
418
448
|
UI.user_error!("Cannot update languages - could not find an editable info")
|
@@ -447,7 +477,7 @@ module Deliver
|
|
447
477
|
# Finding languages to enable
|
448
478
|
def verify_available_version_languages!(options, app, languages)
|
449
479
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
450
|
-
version = app
|
480
|
+
version = fetch_edit_app_store_version(app, platform)
|
451
481
|
|
452
482
|
unless version
|
453
483
|
UI.user_error!("Cannot update languages - could not find an editable version for '#{platform}'")
|
@@ -14,9 +14,14 @@ module Deliver
|
|
14
14
|
attributes = {}
|
15
15
|
territory_ids = []
|
16
16
|
|
17
|
-
|
17
|
+
# As of 2020-09-14:
|
18
|
+
# Official App Store Connect does not have an endpoint to get app prices for an app
|
19
|
+
# Need to get prices from the app's relationships
|
20
|
+
# Prices from app's relationship doess not have price tier so need to fetch app price with price tier relationship
|
21
|
+
app_prices = app.prices
|
18
22
|
if app_prices.first
|
19
|
-
|
23
|
+
app_price = Spaceship::ConnectAPI.get_app_price(app_price_id: app_prices.first.id, includes: "priceTier").first
|
24
|
+
old_price = app_price.price_tier.id
|
20
25
|
else
|
21
26
|
UI.message("App has no prices yet... Enabling all countries in App Store Connect")
|
22
27
|
territory_ids = Spaceship::ConnectAPI::Territory.all.map(&:id)
|
Binary file
|
Binary file
|
@@ -4,6 +4,25 @@ module Fastlane
|
|
4
4
|
LANE_NAME = :LANE_NAME
|
5
5
|
PLATFORM_NAME = :PLATFORM_NAME
|
6
6
|
ENVIRONMENT = :ENVIRONMENT
|
7
|
+
|
8
|
+
# A slighly decorated hash that will store and fetch sensitive data
|
9
|
+
# but not display it while iterating keys and values
|
10
|
+
class LaneContextValues < Hash
|
11
|
+
def initialize
|
12
|
+
@sensitive_context = {}
|
13
|
+
end
|
14
|
+
|
15
|
+
def set_sensitive(key, value)
|
16
|
+
@sensitive_context[key] = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def [](key)
|
20
|
+
if @sensitive_context.key?(key)
|
21
|
+
return @sensitive_context[key]
|
22
|
+
end
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
7
26
|
end
|
8
27
|
|
9
28
|
def self.reset_aliases
|
@@ -27,7 +46,7 @@ module Fastlane
|
|
27
46
|
|
28
47
|
# The shared hash can be accessed by any action and contains information like the screenshots path or beta URL
|
29
48
|
def self.lane_context
|
30
|
-
@lane_context ||=
|
49
|
+
@lane_context ||= SharedValues::LaneContextValues.new
|
31
50
|
end
|
32
51
|
|
33
52
|
# Used in tests to get a clear lane before every test
|