INNER CODE UNIT · Ruby
annotate_sentry_mapping_uuid
wordpress-mobile/WordPress-Android · fastlane/lanes/build.rb:481
def annotate_sentry_mapping_uuid(app:, aab_file:)
sentry_props = sh('unzip', '-p', aab_file, 'base/assets/sentry-debug-meta.properties', step_name: 'Extract sentry-debug-meta.properties') do |status, result, _|
status.success? ? result : nil
end
if sentry_props.nil?
UI.important("Unable to extract Sentry properties file from #{aab_file}. Skipping annotating the build with the mapping UUID.")
return
end
line = sentry_props.split("\n").find { |l| l.start_with?('io.sentry.ProguardUuids=') }
if line.nil?
UI.error("`io.sentry.ProguardUuids` line not found in #{aab_file}'s `sentry-debug-meta.properties` file")
return
end
uuid = line.split('=', 2).last.strip
buildkite_annotate(style: 'info', context: "sentry-mapping-uuid-#{app}", message: "Sentry mapping UUID for #{app}: #{uuid}")
end