Skip to content

Instantly share code, notes, and snippets.

@ghawkgu
Created March 31, 2012 07:20
Show Gist options
  • Save ghawkgu/2260320 to your computer and use it in GitHub Desktop.
Save ghawkgu/2260320 to your computer and use it in GitHub Desktop.
Increase build number of an Xcode project for each build.
#! /bin/bash
# Increase build number for each build.
# Use "Run Script" to append this script into a project's scheme.
buildNumber=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist)
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-Info.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment