Skip to content

Instantly share code, notes, and snippets.

@guoc
Forked from markcerqueira/xcode_build_phase.sh
Last active April 14, 2017 00:49
Show Gist options
  • Save guoc/ad918feec82d478bc0bd8f6feeac485b to your computer and use it in GitHub Desktop.
Save guoc/ad918feec82d478bc0bd8f6feeac485b to your computer and use it in GitHub Desktop.
Crittercism Auto-Upload dSYM with API Key as an environmental variable
# only upload during Release builds, otherwise every build will upload a dSYM
if [ "${CONFIGURATION}" = "Release" ]; then
readonly API_KEY_PATH=~/.crittercism_api_key
# put the secret key in this file
if [ -f $API_KEY_PATH ]; then
APP_ID="REPLACE_WITH_MY_APP_ID"
API_KEY=$(<$API_KEY_PATH)
# run the script
source "${SRCROOT}"/<CRITTERCISM_DIR_NAME>/dsym_upload.sh
else
echo "$API_KEY_PATH does not exist. Not uploading dSYM!"
fi
else
echo "Not a Release build so not auto-uploading dSYM file."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment