Skip to content

Instantly share code, notes, and snippets.

@below
Created December 20, 2011 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save below/1501383 to your computer and use it in GitHub Desktop.
Save below/1501383 to your computer and use it in GitHub Desktop.
Simple Script to set a version number in the Info Plist
# This needs to go into a script build phase prior to "Copying resources"
# Set the version from version.txt
product_version=`cat version.txt`
# Instead of version.txt, you can use whatever your filthy heart desires
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion \"$product_version\"" "$TARGET_BUILD_DIR/$INFOPLIST_PATH"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment