Skip to content

Instantly share code, notes, and snippets.

@bynil
Created March 23, 2017 07:41
Show Gist options
  • Save bynil/8f861d90b3fd4534a381a7b1d5312813 to your computer and use it in GitHub Desktop.
Save bynil/8f861d90b3fd4534a381a7b1d5312813 to your computer and use it in GitHub Desktop.
Xcode auto-increment build number
#!/bin/bash
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