Created
August 15, 2023 20:26
-
-
Save rayray/5f75fdca3612ddbbd3d7b3b7c759c266 to your computer and use it in GitHub Desktop.
extract diagnostics folder from an xcresult
This file contains 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
#!/bin/bash | |
# Raymond Edwards | |
# extract diagnostics folder from an xcresult. this script assumes jq is installed | |
# if Diagnostics/ already exists, xcresulttool will overwrite it | |
XCRESULT="${1}" | |
DIAGNOSTICS_ID=$(xcrun xcresulttool get --format json --path "${XCRESULT}" | jq -r '."actions"."_values"[0]."actionResult"."diagnosticsRef"."id"."_value"') | |
echo "Dumping xcresult diagnostic data into Diagnostics/" | |
xcrun xcresulttool export --type directory --output-path Diagnostics --path "${XCRESULT}" --id "${DIAGNOSTICS_ID}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment