Skip to content

Instantly share code, notes, and snippets.

@sonsongithub
Created May 29, 2012 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonsongithub/2822226 to your computer and use it in GitHub Desktop.
Save sonsongithub/2822226 to your computer and use it in GitHub Desktop.
Xcode "Run script" for auto updating subversion revision and build number.
svn update .
revisionNumber=$(svnversion -n)
/usr/libexec/PlistBuddy -c "Set :CFBundleSubversionRevision $revisionNumber" "$INFOPLIST_FILE"
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment