Skip to content

Instantly share code, notes, and snippets.

@tiagobbraga
Created November 28, 2015 00:26
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 tiagobbraga/8f52cbc7c5e749c03cd3 to your computer and use it in GitHub Desktop.
Save tiagobbraga/8f52cbc7c5e749c03cd3 to your computer and use it in GitHub Desktop.
CFBundleShortVersionString with CFBundleVersion
#!/bin/bash
cV=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE")
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
b=${bN##*.}
bN=$((b += 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $cV.$bN" "$INFOPLIST_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment