Skip to content

Instantly share code, notes, and snippets.

@bsneed
Created July 21, 2011 06:33
Show Gist options
  • Save bsneed/1096645 to your computer and use it in GitHub Desktop.
Save bsneed/1096645 to your computer and use it in GitHub Desktop.
Copy a settings bundle and set a useful version for testflight if its a Debug build. This happens post file copy and won't change your source files.
#!/bin/bash
BUILD_VER=$(/usr/bin/defaults read ${CODESIGNING_FOLDER_PATH}/Info CFBundleVersion)
BUILD_APPNAME=$(/usr/bin/defaults read ${CODESIGNING_FOLDER_PATH}/Info CFBundleDisplayName)
if [ "$CONFIGURATION" == "Debug" ]; then
echo leaving Settings.bundle in place.
/usr/bin/defaults write ${CODESIGNING_FOLDER_PATH}/Info CFBundleDisplayName "WM ß - $BUILD_VER"
else
rm -rf ${CODESIGNING_FOLDER_PATH}/Settings.bundle
fi
BUILD_DATE=$(date)
/usr/bin/defaults write ${CODESIGNING_FOLDER_PATH}/Info CFBuildDate "$BUILD_DATE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment