File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ def self.run(params)
16
16
if File . exist? ( app_thinning_plist_path )
17
17
plist = Plist . parse_xml ( app_thinning_plist_path )
18
18
plist [ 'variants' ] . each do |_key , variant |
19
- # FIXME: We should probably not take only the first `variantDescriptor` from the list. But that'll do for now as a draft implementation.
20
- vd = variant [ 'variantDescriptors' ] &.first
21
- variant_metadata = vd . nil? ? { device : 'Universal' } : { device : vd [ 'device' ] , 'OS Version' : vd [ 'os-version' ] }
22
- payload . add_metric ( name : 'Download Size' , value : variant [ 'sizeCompressedApp' ] , meta : variant_metadata )
23
- payload . add_metric ( name : 'Install Size' , value : variant [ 'sizeUncompressedApp' ] , meta : variant_metadata )
19
+ variant_descriptors = variant [ 'variantDescriptors' ] || [ { 'device' => 'Universal' } ]
20
+ variant_descriptors . each do |desc |
21
+ variant_metadata = { device : desc [ 'device' ] , 'OS Version' : desc [ 'os-version' ] }
22
+ payload . add_metric ( name : 'Download Size' , value : variant [ 'sizeCompressedApp' ] , meta : variant_metadata )
23
+ payload . add_metric ( name : 'Install Size' , value : variant [ 'sizeUncompressedApp' ] , meta : variant_metadata )
24
+ end
24
25
end
25
26
end
26
27
You can’t perform that action at this time.
0 commit comments