Skip to content

Commit 309a9d1

Browse files
committed
fix: sdk size metrics workflow
1 parent 6128b56 commit 309a9d1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/SampleApp/fastlane/Fastfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,17 @@ lane :frameworks_sizes do
184184
yarn_all
185185
sh('yarn build')
186186
sh('yarn minify-bundle')
187+
187188
js_bundle_size = file_size(path: 'package/lib/module/bundle.min.js')
188-
{ js_bundle_size: js_bundle_size }
189+
190+
# Include shared-native footprint so native only changes affect metrics from the shared directory.
191+
native_shared_bytes = Dir.glob('package/shared-native/**/*').sum do |path|
192+
File.file?(path) ? File.size(path) : 0
193+
end
194+
195+
native_shared_size = native_shared_bytes / 1024.0
196+
197+
{ js_bundle_size: js_bundle_size + native_shared_size }
189198
end
190199
end
191200

0 commit comments

Comments
 (0)