Guest User

Untitled

a guest
Sep 28th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. # xcode-build-bump.sh
  2. # @desc Auto-increment the build number every time the project is run.
  3. # @usage
  4. # 1. Select: your Target in Xcode
  5. # 2. Select: Build Phases Tab
  6. # 3. Select: Add Build Phase -> Add Run Script
  7. # 4. Paste code below in to new "Run Script" section
  8. # 5. Drag the "Run Script" below "Link Binaries With Libraries"
  9. # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
  10.  
  11. buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
  12. buildNumber=$(($buildNumber + 1))
  13. /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Add Comment
Please, Sign In to add comment