fastlane 2.157.2 → 2.157.3
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 +66 -66
- data/deliver/lib/deliver/runner.rb +0 -1
- data/fastlane/lib/fastlane/actions/{.git_commit.rb.swp → .ensure_git_status_clean.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -8
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +87 -68
- data/fastlane/lib/fastlane/actions/set_changelog.rb +0 -1
- 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 +12 -12
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- 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/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- 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/match/lib/match/spaceship_ensure.rb +5 -5
- data/{fastlane/lib/fastlane/.erb_template_helper.rb.swp → pilot/lib/pilot/.manager.rb.swp} +0 -0
- data/pilot/lib/pilot/build_manager.rb +0 -3
- data/pilot/lib/pilot/manager.rb +1 -2
- data/produce/lib/produce/itunes_connect.rb +0 -1
- data/sigh/lib/assets/resign.sh +9 -6
- data/sigh/lib/sigh/runner.rb +0 -1
- data/spaceship/lib/spaceship/client.rb +1 -0
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +10 -4
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +5 -5
- data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -50
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +8 -0
- metadata +25 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd1050cf89fc0ae6d56214788fb1f78af159c544bc13f70533173a99b18444e5
|
4
|
+
data.tar.gz: a42063c3aee9786fd39100296898218318680e8c206a5a59dda6016ab4d0608d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87560b19fb15dc19e9930d6339c49126eb7451a29d6d6bfb4bfaa896969e1e831857ce4e76956fc3e774bc17e1d4c8a9dcaf7c114aa73052284f05f228776bf5
|
7
|
+
data.tar.gz: f0ffda1c6a9141737987eed86ccef7e4a305b27690e8b16c0e4720e281b44d38cd81a6d0312d804977e855450802f3358d52adeff4a1a444cc5de137581d847e
|
data/README.md
CHANGED
@@ -34,11 +34,11 @@ 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='danielle-tomlinson'>
|
38
|
+
<a href='https://github.com/endocrimes'>
|
39
|
+
<img src='https://github.com/endocrimes.png?size=140'>
|
40
40
|
</a>
|
41
|
-
<h4 align='center'><a href='https://twitter.com/
|
41
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
42
42
|
</td>
|
43
43
|
<td id='aaron-brager'>
|
44
44
|
<a href='https://github.com/getaaron'>
|
@@ -46,17 +46,17 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
46
46
|
</a>
|
47
47
|
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
48
48
|
</td>
|
49
|
-
<td id='
|
50
|
-
<a href='https://github.com/
|
51
|
-
<img src='https://github.com/
|
49
|
+
<td id='helmut-januschka'>
|
50
|
+
<a href='https://github.com/hjanuschka'>
|
51
|
+
<img src='https://github.com/hjanuschka.png?size=140'>
|
52
52
|
</a>
|
53
|
-
<h4 align='center'><a href='https://twitter.com/
|
53
|
+
<h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
|
54
54
|
</td>
|
55
|
-
<td id='
|
56
|
-
<a href='https://github.com/
|
57
|
-
<img src='https://github.com/
|
55
|
+
<td id='fumiya-nakamura'>
|
56
|
+
<a href='https://github.com/nafu'>
|
57
|
+
<img src='https://github.com/nafu.png?size=140'>
|
58
58
|
</a>
|
59
|
-
<h4 align='center'><a href='https://twitter.com/
|
59
|
+
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
60
60
|
</td>
|
61
61
|
<td id='jérôme-lacoste'>
|
62
62
|
<a href='https://github.com/lacostej'>
|
@@ -66,35 +66,35 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
66
66
|
</td>
|
67
67
|
</tr>
|
68
68
|
<tr>
|
69
|
-
<td id='
|
70
|
-
<a href='https://github.com/
|
71
|
-
<img src='https://github.com/
|
69
|
+
<td id='jimmy-dee'>
|
70
|
+
<a href='https://github.com/jdee'>
|
71
|
+
<img src='https://github.com/jdee.png?size=140'>
|
72
72
|
</a>
|
73
|
-
<h4 align='center'
|
73
|
+
<h4 align='center'>Jimmy Dee</h4>
|
74
74
|
</td>
|
75
|
-
<td id='
|
76
|
-
<a href='https://github.com/
|
77
|
-
<img src='https://github.com/
|
75
|
+
<td id='olivier-halligon'>
|
76
|
+
<a href='https://github.com/AliSoftware'>
|
77
|
+
<img src='https://github.com/AliSoftware.png?size=140'>
|
78
78
|
</a>
|
79
|
-
<h4 align='center'><a href='https://twitter.com/
|
79
|
+
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
80
80
|
</td>
|
81
|
-
<td id='
|
82
|
-
<a href='https://github.com/
|
83
|
-
<img src='https://github.com/
|
81
|
+
<td id='jan-piotrowski'>
|
82
|
+
<a href='https://github.com/janpio'>
|
83
|
+
<img src='https://github.com/janpio.png?size=140'>
|
84
84
|
</a>
|
85
|
-
<h4 align='center'><a href='https://twitter.com/
|
85
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
86
86
|
</td>
|
87
|
-
<td id='
|
88
|
-
<a href='https://github.com/
|
89
|
-
<img src='https://github.com/
|
87
|
+
<td id='maksym-grebenets'>
|
88
|
+
<a href='https://github.com/mgrebenets'>
|
89
|
+
<img src='https://github.com/mgrebenets.png?size=140'>
|
90
90
|
</a>
|
91
|
-
<h4 align='center'><a href='https://twitter.com/
|
91
|
+
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
92
92
|
</td>
|
93
|
-
<td id='
|
94
|
-
<a href='https://github.com/
|
95
|
-
<img src='https://github.com/
|
93
|
+
<td id='max-ott'>
|
94
|
+
<a href='https://github.com/max-ott'>
|
95
|
+
<img src='https://github.com/max-ott.png?size=140'>
|
96
96
|
</a>
|
97
|
-
<h4 align='center'><a href='https://twitter.com/
|
97
|
+
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
98
98
|
</td>
|
99
99
|
</tr>
|
100
100
|
<tr>
|
@@ -104,29 +104,29 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
104
104
|
</a>
|
105
105
|
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
106
106
|
</td>
|
107
|
-
<td id='
|
108
|
-
<a href='https://github.com/
|
109
|
-
<img src='https://github.com/
|
107
|
+
<td id='luka-mirosevic'>
|
108
|
+
<a href='https://github.com/lmirosevic'>
|
109
|
+
<img src='https://github.com/lmirosevic.png?size=140'>
|
110
110
|
</a>
|
111
|
-
<h4 align='center'><a href='https://twitter.com/
|
111
|
+
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
112
112
|
</td>
|
113
|
-
<td id='
|
114
|
-
<a href='https://github.com/
|
115
|
-
<img src='https://github.com/
|
113
|
+
<td id='josh-holtz'>
|
114
|
+
<a href='https://github.com/joshdholtz'>
|
115
|
+
<img src='https://github.com/joshdholtz.png?size=140'>
|
116
116
|
</a>
|
117
|
-
<h4 align='center'>
|
117
|
+
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
118
118
|
</td>
|
119
|
-
<td id='
|
120
|
-
<a href='https://github.com/
|
121
|
-
<img src='https://github.com/
|
119
|
+
<td id='manu-wallner'>
|
120
|
+
<a href='https://github.com/milch'>
|
121
|
+
<img src='https://github.com/milch.png?size=140'>
|
122
122
|
</a>
|
123
|
-
<h4 align='center'><a href='https://twitter.com/
|
123
|
+
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
124
124
|
</td>
|
125
|
-
<td id='
|
126
|
-
<a href='https://github.com/
|
127
|
-
<img src='https://github.com/
|
125
|
+
<td id='iulian-onofrei'>
|
126
|
+
<a href='https://github.com/revolter'>
|
127
|
+
<img src='https://github.com/revolter.png?size=140'>
|
128
128
|
</a>
|
129
|
-
<h4 align='center'><a href='https://twitter.com/
|
129
|
+
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
130
130
|
</td>
|
131
131
|
</tr>
|
132
132
|
<tr>
|
@@ -136,23 +136,17 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
136
136
|
</a>
|
137
137
|
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
138
138
|
</td>
|
139
|
-
<td id='
|
140
|
-
<a href='https://github.com/
|
141
|
-
<img src='https://github.com/
|
142
|
-
</a>
|
143
|
-
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
144
|
-
</td>
|
145
|
-
<td id='manu-wallner'>
|
146
|
-
<a href='https://github.com/milch'>
|
147
|
-
<img src='https://github.com/milch.png?size=140'>
|
139
|
+
<td id='matthew-ellis'>
|
140
|
+
<a href='https://github.com/matthewellis'>
|
141
|
+
<img src='https://github.com/matthewellis.png?size=140'>
|
148
142
|
</a>
|
149
|
-
<h4 align='center'><a href='https://twitter.com/
|
143
|
+
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
150
144
|
</td>
|
151
|
-
<td id='
|
152
|
-
<a href='https://github.com/
|
153
|
-
<img src='https://github.com/
|
145
|
+
<td id='joshua-liebowitz'>
|
146
|
+
<a href='https://github.com/taquitos'>
|
147
|
+
<img src='https://github.com/taquitos.png?size=140'>
|
154
148
|
</a>
|
155
|
-
<h4 align='center'><a href='https://twitter.com/
|
149
|
+
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
156
150
|
</td>
|
157
151
|
<td id='kohki-miki'>
|
158
152
|
<a href='https://github.com/giginet'>
|
@@ -160,13 +154,19 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
160
154
|
</a>
|
161
155
|
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
162
156
|
</td>
|
157
|
+
<td id='jorge-revuelta-h'>
|
158
|
+
<a href='https://github.com/minuscorp'>
|
159
|
+
<img src='https://github.com/minuscorp.png?size=140'>
|
160
|
+
</a>
|
161
|
+
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
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='andrew-mcburney'>
|
166
|
+
<a href='https://github.com/armcburney'>
|
167
|
+
<img src='https://github.com/armcburney.png?size=140'>
|
168
168
|
</a>
|
169
|
-
<h4 align='center'><a href='https://twitter.com/
|
169
|
+
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
170
170
|
</td>
|
171
171
|
<td id='stefan-natchev'>
|
172
172
|
<a href='https://github.com/snatchev'>
|
@@ -28,7 +28,6 @@ module Deliver
|
|
28
28
|
def login
|
29
29
|
UI.message("Login to App Store Connect (#{options[:username]})")
|
30
30
|
Spaceship::ConnectAPI.login(options[:username], nil, use_portal: false, use_tunes: true)
|
31
|
-
Spaceship::ConnectAPI.select_team
|
32
31
|
UI.message("Login successful")
|
33
32
|
end
|
34
33
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -27,26 +27,29 @@ module Fastlane
|
|
27
27
|
|
28
28
|
def self.get_build_number(params)
|
29
29
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
30
|
-
Spaceship::
|
31
|
-
Spaceship::Tunes.select_team(team_id: params[:team_id], team_name: params[:team_name])
|
30
|
+
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true, tunes_team_id: params[:team_id], team_name: params[:team_name])
|
32
31
|
UI.message("Login successful")
|
33
32
|
|
34
|
-
|
33
|
+
platform = Spaceship::ConnectAPI::Platform.map(params[:platform])
|
34
|
+
|
35
|
+
app = Spaceship::ConnectAPI::App.find(params[:app_identifier])
|
35
36
|
UI.user_error!("Could not find an app on App Store Connect with app_identifier: #{params[:app_identifier]}") unless app
|
36
37
|
if params[:live]
|
37
38
|
UI.message("Fetching the latest build number for live-version")
|
38
|
-
|
39
|
-
|
39
|
+
live_version = app.get_live_app_store_version(platform: platform)
|
40
|
+
|
41
|
+
UI.user_error!("Could not find a live-version of #{params[:app_identifier]} on App Store Connect") unless live_version
|
42
|
+
build_nr = live_version.build.version
|
40
43
|
|
41
|
-
UI.message("Latest upload for live-version #{
|
44
|
+
UI.message("Latest upload for live-version #{live_version.version_string} is build: #{build_nr}")
|
42
45
|
|
43
|
-
return OpenStruct.new({ build_nr: build_nr, build_v:
|
46
|
+
return OpenStruct.new({ build_nr: build_nr, build_v: live_version.version_string })
|
44
47
|
else
|
45
48
|
version_number = params[:version]
|
46
49
|
platform = params[:platform]
|
47
50
|
|
48
51
|
# Create filter for get_builds with optional version number
|
49
|
-
filter = { app: app.
|
52
|
+
filter = { app: app.id }
|
50
53
|
if version_number
|
51
54
|
filter["preReleaseVersion.version"] = version_number
|
52
55
|
version_number_message = "version #{version_number}"
|
@@ -6,16 +6,16 @@ module Fastlane
|
|
6
6
|
class DownloadDsymsAction < Action
|
7
7
|
# rubocop:disable Metrics/PerceivedComplexity
|
8
8
|
def self.run(params)
|
9
|
+
require 'openssl'
|
9
10
|
require 'spaceship'
|
10
11
|
require 'net/http'
|
11
12
|
|
12
13
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
13
|
-
Spaceship::
|
14
|
-
Spaceship::Tunes.select_team
|
14
|
+
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true)
|
15
15
|
UI.message("Login successful")
|
16
16
|
|
17
17
|
# Get App
|
18
|
-
app = Spaceship::
|
18
|
+
app = Spaceship::ConnectAPI::App.find(params[:app_identifier])
|
19
19
|
unless app
|
20
20
|
UI.user_error!("Could not find app with bundle identifier '#{params[:app_identifier]}' on account #{params[:username]}")
|
21
21
|
end
|
@@ -23,38 +23,35 @@ module Fastlane
|
|
23
23
|
# Process options
|
24
24
|
version = params[:version]
|
25
25
|
build_number = params[:build_number].to_s unless params[:build_number].nil?
|
26
|
-
|
26
|
+
itc_platform = params[:platform]
|
27
27
|
output_directory = params[:output_directory]
|
28
28
|
wait_for_dsym_processing = params[:wait_for_dsym_processing]
|
29
29
|
wait_timeout = params[:wait_timeout]
|
30
30
|
min_version = Gem::Version.new(params[:min_version]) if params[:min_version]
|
31
31
|
|
32
|
+
platform = Spaceship::ConnectAPI::Platform.map(itc_platform)
|
33
|
+
|
32
34
|
# Set version if it is latest
|
33
35
|
if version == 'latest'
|
34
36
|
# Try to grab the edit version first, else fallback to live version
|
35
37
|
UI.message("Looking for latest version...")
|
36
|
-
latest_version = app.
|
37
|
-
|
38
|
-
UI.user_error!("Could not find latest version for your app, please try setting a specific version") if latest_version.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
else
|
45
|
-
# The build_version of a candidate build does not always match the one in latest_version so get the version and build number from the same place.
|
46
|
-
version = latest_candidate_build.train_version
|
47
|
-
build_number = latest_candidate_build.build_version
|
48
|
-
end
|
38
|
+
latest_version = app.get_edit_app_store_version(platform: platform) || app.get_live_app_store_version(platform: platform)
|
39
|
+
|
40
|
+
UI.user_error!("Could not find latest version for your app, please try setting a specific version") if latest_version.nil?
|
41
|
+
|
42
|
+
latest_build = get_latest_build!(app_id: app.id, version: latest_version.version_string, platform: platform)
|
43
|
+
|
44
|
+
version = latest_build.app_version
|
45
|
+
build_number = latest_build.version
|
49
46
|
elsif version == 'live'
|
50
47
|
UI.message("Looking for live version...")
|
51
|
-
live_version = app.
|
48
|
+
live_version = app.get_live_app_store_version(platform: platform)
|
52
49
|
|
53
50
|
UI.user_error!("Could not find live version for your app, please try setting 'latest' or a specific version") if live_version.nil?
|
54
51
|
|
55
52
|
# No need to search for candidates, because released App Store version should only have one build
|
56
|
-
version = live_version.
|
57
|
-
build_number = live_version.
|
53
|
+
version = live_version.version_string
|
54
|
+
build_number = live_version.build.version
|
58
55
|
end
|
59
56
|
|
60
57
|
# Remove leading zeros from version string (eg. 1.02 -> 1.2)
|
@@ -74,76 +71,98 @@ module Fastlane
|
|
74
71
|
message << "(#{build_number})" if build_number
|
75
72
|
UI.message(message.join(" "))
|
76
73
|
|
77
|
-
app
|
74
|
+
filter = { app: app.id }
|
75
|
+
filter["preReleaseVersion.platform"] = platform
|
76
|
+
build_resps = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion").all_pages
|
77
|
+
builds = build_resps.flat_map(&:to_models)
|
78
|
+
|
79
|
+
builds.each do |build|
|
80
|
+
asc_app_version = build.app_version
|
81
|
+
asc_build_number = build.version
|
82
|
+
|
78
83
|
message = []
|
79
|
-
message << "Found train (version): #{
|
84
|
+
message << "Found train (version): #{asc_app_version}"
|
80
85
|
message << ", comparing to supplied version: #{version}" if version
|
81
86
|
UI.verbose(message.join(" "))
|
82
87
|
|
83
|
-
if version && version !=
|
84
|
-
UI.verbose("Version #{version} doesn't match: #{
|
88
|
+
if version && version != asc_app_version
|
89
|
+
UI.verbose("Version #{version} doesn't match: #{asc_app_version}")
|
85
90
|
next
|
86
91
|
end
|
87
92
|
|
88
|
-
if min_version && min_version > Gem::Version.new(
|
89
|
-
UI.verbose("Min version #{min_version} not reached: #{
|
93
|
+
if min_version && min_version > Gem::Version.new(asc_app_version)
|
94
|
+
UI.verbose("Min version #{min_version} not reached: #{asc_app_version}")
|
90
95
|
next
|
91
96
|
end
|
92
97
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
UI.verbose(message.join(" "))
|
98
|
+
message = []
|
99
|
+
message << "Found build version: #{asc_build_number}"
|
100
|
+
message << ", comparing to supplied build_number: #{build_number}" if build_number
|
101
|
+
UI.verbose(message.join(" "))
|
98
102
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
+
if build_number && asc_build_number != build_number
|
104
|
+
UI.verbose("build_version: #{asc_build_number} doesn't match: #{build_number}")
|
105
|
+
next
|
106
|
+
end
|
103
107
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
if !wait_for_dsym_processing || (Time.now - start) > wait_timeout
|
120
|
-
# In some cases, AppStoreConnect does not process the dSYMs, thus no error should be thrown.
|
121
|
-
UI.message("Could not find any dSYM for #{build.build_version} (#{train.version_string})")
|
122
|
-
else
|
123
|
-
UI.message("Waiting for dSYM file to appear...")
|
124
|
-
sleep(30)
|
125
|
-
next
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
break
|
130
|
-
end
|
108
|
+
UI.verbose("Build_version: #{asc_build_number} matches #{build_number}, grabbing dsym_url") if build_number
|
109
|
+
get_details_and_download_dsym(app: app, train: asc_app_version, build_number: asc_build_number, platform: itc_platform, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.get_details_and_download_dsym(app: nil, train: nil, build_number: nil, platform: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
|
114
|
+
start = Time.now
|
115
|
+
download_url = nil
|
116
|
+
|
117
|
+
loop do
|
118
|
+
begin
|
119
|
+
resp = Spaceship::Tunes.client.build_details(app_id: app.id, train: train, build_number: build_number, platform: platform)
|
120
|
+
|
121
|
+
resp['apple_id'] = app.id
|
122
|
+
build_details = Spaceship::Tunes::BuildDetails.factory(resp)
|
131
123
|
|
132
|
-
|
133
|
-
|
134
|
-
|
124
|
+
download_url = build_details.dsym_url
|
125
|
+
UI.verbose("dsym_url: #{download_url}")
|
126
|
+
rescue Spaceship::TunesClient::ITunesConnectError => ex
|
127
|
+
UI.error("Error accessing dSYM file for build\n\n#{build}\n\nException: #{ex}")
|
128
|
+
end
|
129
|
+
|
130
|
+
unless download_url
|
131
|
+
if !wait_for_dsym_processing || (Time.now - start) > wait_timeout
|
132
|
+
# In some cases, AppStoreConnect does not process the dSYMs, thus no error should be thrown.
|
133
|
+
UI.message("Could not find any dSYM for #{build_number} (#{train})")
|
135
134
|
else
|
136
|
-
UI.message("
|
135
|
+
UI.message("Waiting for dSYM file to appear...")
|
136
|
+
sleep(30)
|
137
|
+
next
|
137
138
|
end
|
138
139
|
end
|
140
|
+
|
141
|
+
break
|
139
142
|
end
|
140
143
|
|
141
|
-
if
|
142
|
-
|
144
|
+
if download_url
|
145
|
+
self.download(download_url, app.bundle_id, train, build_number, output_directory)
|
146
|
+
return if build_number
|
147
|
+
else
|
148
|
+
UI.message("No dSYM URL for #{build_number} (#{train})")
|
143
149
|
end
|
144
150
|
end
|
145
151
|
# rubocop:enable Metrics/PerceivedComplexity
|
146
152
|
|
153
|
+
def self.get_latest_build!(app_id: nil, version: nil, platform: nil)
|
154
|
+
filter = { app: app_id }
|
155
|
+
filter["preReleaseVersion.version"] = version
|
156
|
+
filter["preReleaseVersion.platform"] = platform
|
157
|
+
latest_build = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion").first
|
158
|
+
|
159
|
+
if latest_build.nil?
|
160
|
+
UI.user_error!("Could not find latest bulid for version #{version}")
|
161
|
+
end
|
162
|
+
|
163
|
+
return latest_build
|
164
|
+
end
|
165
|
+
|
147
166
|
def self.download(download_url, bundle_id, train_number, build_version, output_directory)
|
148
167
|
result = self.download_file(download_url)
|
149
168
|
path = write_dsym(result, bundle_id, train_number, build_version, output_directory)
|