Created
May 19, 2016 16:55
-
-
Save jsaguiar/38b58ba9feb3fa807e69ef36cb7fd5e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run this script on yout dSYMS folder | |
import subprocess | |
app_name = "your app name" | |
new_rellic_key = "new rellic key (same as app)" | |
all_dsyms = subprocess.Popen('ls', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
for line in all_dsyms.stdout.readlines(): | |
dsym = line.rstrip('\n') | |
zip_file = dsym+'.zip' | |
zip_command = "/usr/bin/zip --recurse-paths '"+zip_file+"' '"+ dsym + "'" | |
subprocess.Popen(zip_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate() | |
uuid_command = "xcrun dwarfdump --uuid "+line.rstrip('\n')+" | tr '[:upper:]' '[:lower:]' | tr -d '-'| awk '{print $2}' | xargs | sed 's/ /,/g'" | |
uuids = subprocess.Popen(uuid_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
for uuid in uuids.stdout.readlines(): | |
send_command = "curl -F dsym=@'"+zip_file+"' -F buildId='"+uuid.rstrip('\n')+"' -F appName= '"+ app_name + "' -H 'X-APP-LICENSE-KEY: "+ new_rellic_key + "' https://mobile-symbol-upload.newrelic.com/symbol" | |
subprocess.Popen(send_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate() | |
print("done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment