Skip to content

Instantly share code, notes, and snippets.

@julianjames
Last active December 25, 2015 21:09
Show Gist options
  • Save julianjames/7040290 to your computer and use it in GitHub Desktop.
Save julianjames/7040290 to your computer and use it in GitHub Desktop.
We create a unique build number by taking the date and time and creating a hexadecimal version so as to not make it too obvious. This is written to project plist file.
buildNumber=`/bin/date +%Y%m%d%H%M%S`
hexNumber=`echo "obase=16;ibase=10; $buildNumber" | bc`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $hexNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment