Skip to content

Instantly share code, notes, and snippets.

@jeffreyjackson
Created April 8, 2015 14:31
Show Gist options
  • Save jeffreyjackson/915ecb98a9e9090ff71e to your computer and use it in GitHub Desktop.
Save jeffreyjackson/915ecb98a9e9090ff71e to your computer and use it in GitHub Desktop.
Autoincrement Xcode Build
#!/bin/bash
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
bN=$((bN += 1))
bN=$(printf "%d" $bN)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment