Skip to content

Instantly share code, notes, and snippets.

@SuperY
Created April 25, 2014 13:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SuperY/11289128 to your computer and use it in GitHub Desktop.
Save SuperY/11289128 to your computer and use it in GitHub Desktop.
Set Xcode build number by the building time
version=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $PRODUCT_SETTINGS_PATH`
version=`expr $version + 1`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $version" $PRODUCT_SETTINGS_PATH
#/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $version\" $PRODUCT_SETTINGS_PATH 这行代码会让version也自增,一般不需要"
#From 'http://blog.csdn.net/kafeidev/article/details/8221273'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment