Skip to content

Instantly share code, notes, and snippets.

@julianjames
Last active December 26, 2015 07:59
Show Gist options
  • Save julianjames/7118915 to your computer and use it in GitHub Desktop.
Save julianjames/7118915 to your computer and use it in GitHub Desktop.
instruments -w device_UDID -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" "Tasky iOS" -e UIASCRIPT "${PROJECT_DIR}/simpletest.js" -e UIARESULTSPATH /tmp | grep "Error" > /tmp/ui_errors.txt
filesize=$(stat -f "%z" /tmp/ui_errors.txt)
rm -rf /tmp/Run*
if [ $filesize = "0" ]; then
echo
echo "UIAutomation passed"
echo
curl \
-F "status=2" \
-F "notify=1" \
-F "notes=${commitsString}" \
-F "notes_type=0" \
-F "ipa=@/tmp/Tasky.ipa" \
-H "X-HockeyAppToken: company_id_token" \
https://rink.hockeyapp.net/api/2/apps/app_id/app_versions/upload
else
echo
echo "UIAutomation has errors:"
cat /tmp/ui_errors.txt
echo
kill $PPID
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment