Skip to content

Instantly share code, notes, and snippets.

@mojtabacazi
Created May 7, 2015 01:14
Show Gist options
  • Save mojtabacazi/00479235feefdae20afe to your computer and use it in GitHub Desktop.
Save mojtabacazi/00479235feefdae20afe to your computer and use it in GitHub Desktop.
TARGET="$INFOPLIST_FILE"
echo $TARGET
if [ ! -f "$TARGET" ]; then
echo "missing file $TARGET"
exit 1;
fi
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$TARGET")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$TARGET"
@mojtabacazi
Copy link
Author

This should be added as a build phase run script

Make sure you change build number to 1 (from 1.0) before running this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment