Skip to content

Commit 0935df5

Browse files
committed
Add platform key to the metadata
1 parent affb852 commit 0935df5

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def self.run(params)
1616
payload = Fastlane::WPMRT::AppSizeMetricsPayload.new(
1717
'App Name': params[:app_name],
1818
'Build Type': params[:build_type],
19-
'App Version': params[:app_version]
19+
'App Version': params[:app_version],
20+
'Platform': 'iOS'
2021
)
2122
payload.add_metric(name: 'File Size', value: File.size(params[:ipa_path]))
2223

@@ -130,7 +131,7 @@ def self.available_options
130131
description: 'The path to the `app-thinning.plist` file to extract thinning size information from',
131132
type: String,
132133
optional: true,
133-
default_value_dynamic: true # If nil, will try to use 'app-thinning.plist' file next to the `ipa_path`
134+
default_value_dynamic: true # If nil, will try to use 'app-thinning.plist' file next to the `ipa_path` if one exists
134135
),
135136
]
136137
end

spec/ios_send_app_size_metrics_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_app_size_action(fake_ipa_size:, expected_json:, **other_action_args)
5757
{ name: 'App Name', value: 'my-app' },
5858
{ name: 'Build Type', value: 'beta' },
5959
{ name: 'App Version', value: '1.2.3' },
60+
{ name: 'Platform', value: 'iOS' },
6061
],
6162
metrics: [
6263
{ name: 'File Size', value: 123_456 },

spec/test-data/app_size_metrics/app-size-metrics-payload.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{
1212
"name": "App Version",
1313
"value": "19.8.0.2"
14+
},
15+
{
16+
"name": "Platform",
17+
"value": "iOS"
1418
}
1519
],
1620
"metrics": [

0 commit comments

Comments
 (0)