Skip to content

Instantly share code, notes, and snippets.

@lottadot
Created March 31, 2010 18:57
Show Gist options
  • Save lottadot/350722 to your computer and use it in GitHub Desktop.
Save lottadot/350722 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ "$BUILD_STYLE" == "Debug" ]; then
echo "Skipping debug"
exit 0;
fi
if [ "$EFFECTIVE_PLATFORM_NAME" == "-iphonesimulator" ]; then
echo "Skipping simulator build"
exit 0;
fi
SRC_PATH=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
RELATIVE_DEST_PATH=dSYM/${EXECUTABLE_NAME}.$(date +%Y%m%d%H%M%S).app.dSYM
DEST_PATH=${PROJECT_DIR}/${RELATIVE_DEST_PATH}
echo "moving ${SRC_PATH} to ${DEST_PATH}"
mv "${SRC_PATH}" "${DEST_PATH}"
if [ -f ".git/config" ]; then
git add "${RELATIVE_DEST_PATH}"
git commit -m "Added dSYM file for ${BUILD_STYLE} build" "${RELATIVE_DEST_PATH}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment