-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Allow manually specifying android mapping-uuid #80
Allow manually specifying android mapping-uuid #80
Conversation
ed50c2b
to
cc6a7b6
Compare
cc6a7b6
to
270e2df
Compare
# Verify files | ||
UI.user_error!("Mapping file does not exist at path: #{mapping_path}") unless File.exist? mapping_path | ||
UI.user_error!("AndroidManifest.xml file does not exist at path: #{android_manifest_path}") unless File.exist? android_manifest_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU This validation was never invoked, as the framework checks its valie using ConfigItem's verify_block
block
@@ -9,17 +9,24 @@ def self.run(params) | |||
mapping_path = params[:mapping_path] | |||
android_manifest_path = params[:android_manifest_path] | |||
|
|||
has_manifest = !android_manifest_path.nil? && File.file?(android_manifest_path.to_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using File.file?
as I understood we don't support passing a directory
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Wow! You've ignored this PR for more than a year, and now you're sending an automated bot to close it with a dummy quote that doesn't explain anything except "hey, this PR will be closed". That's... not nice "Sometimes when I close my eyes, I can’t see." ― _ Anonymous_ 🥀 |
Hey @mateuszkwiecinski, Thanks for opening up this PR a year ago. We added a stale bot not to close issues but to remind us when a PR is stale. We did this to stop ignoring PRs. The bot explains this:
I apologize for not reviewing it. If you still are motivated to finish this PR, please reopen it, ping me, and you will get a review. |
The PR has a lot of code, if you just want to upload a mapping with a pre-generated UUID already present in AndroidManifest.xml using #!/usr/bin/env ruby
require "rexml/document"
# […]
KEY_FLAVOR = "FLAVOR"
KEY_SENTRY_ORG_SLUG = "SENTRY_ORG_SLUG"
KEY_SENTRY_PROJECT_SLUG = "SENTRY_PROJECT_SLUG"
# […]
platform :android do
# […]
# Retrieve UUID and upload mapping.txt to Sentry: https://docs.sentry.io/product/cli/dif/
private_lane :upload_mapping do
Dir.chdir("..") do
flavor = ENV[KEY_FLAVOR] # or lane_context[SharedValues::ENVIRONMENT] or just "live" etc.
xml = REXML::Document.new(File.new("app/build/intermediates/merged_manifest/#{flavor}Release/AndroidManifest.xml"))
uuid = REXML::XPath.first(xml, '//manifest/application/meta-data[@android:name="io.sentry.proguard-uuid"]/@android:value').value
command = ["sentry-cli"]
command << "upload-proguard"
command << "app/build/outputs/mapping/#{flavor}Release/mapping.txt"
command << "--uuid" << uuid
command << "--org" << ENV[KEY_SENTRY_ORG_SLUG]
command << "--project" << ENV[KEY_SENTRY_PROJECT_SLUG]
sh command
end
end along with some environment variables
|
Thanks for sharing the workaround @posativ 😊 |
#79
I gave it a try and tried adding
uuid
support to the plugin. I basically allow passing almost allsentry-cli
parameters, leaving the validation up tosentry-cli
.Please note I'm not familiar with Ruby so I havily relied on other parts of the codebase + code hints and Rubocop offenses that were highlithed. I also didn't know how to write proper tests, I only found ones relying on mocks so I don't actually know if the feature works now.