Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[supply] upload native symbols for crash symbolication #18526

Merged
merged 3 commits into from Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion supply/lib/supply/client.rb
Expand Up @@ -327,12 +327,14 @@ def upload_apk_to_internal_app_sharing(package_name, path_to_apk)
def upload_mapping(path_to_mapping, apk_version_code)
ensure_active_edit!

extension = File.extname(path_to_mapping).downcase

call_google_api do
client.upload_edit_deobfuscationfile(
current_package_name,
current_edit.id,
apk_version_code,
"proguard",
extension == ".zip" ? "nativeCode" : "proguard",
upload_source: path_to_mapping,
content_type: "application/octet-stream"
)
Expand Down
4 changes: 2 additions & 2 deletions supply/lib/supply/options.rb
Expand Up @@ -223,7 +223,7 @@ def self.available_options
default_value: false),
FastlaneCore::ConfigItem.new(key: :mapping,
env_name: "SUPPLY_MAPPING",
description: "Path to the mapping file to upload",
description: "Path to the mapping file to upload (mapping.txt or native-debug-symbols.zip alike)",
short_option: "-d",
conflicting_options: [:mapping_paths],
optional: true,
Expand All @@ -235,7 +235,7 @@ def self.available_options
conflicting_options: [:mapping],
optional: true,
type: Array,
description: "An array of paths to mapping files to upload",
description: "An array of paths to mapping files to upload (mapping.txt or native-debug-symbols.zip alike)",
short_option: "-s",
verify_block: proc do |value|
UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)
Expand Down
1 change: 1 addition & 0 deletions supply/lib/supply/uploader.rb
Expand Up @@ -304,6 +304,7 @@ def upload_mapping(apk_version_codes)
mapping_paths = [Supply.config[:mapping]] unless (mapping_paths = Supply.config[:mapping_paths])
mapping_paths.zip(apk_version_codes).each do |mapping_path, version_code|
if mapping_path
UI.message("Preparing mapping at path '#{mapping_path}', version code #{version_code} for upload...")
client.upload_mapping(mapping_path, version_code)
end
end
Expand Down