Last active
December 27, 2015 12:39
-
-
Save carlosefonseca/7327213 to your computer and use it in GitHub Desktop.
Output the version and build of an iOS .ipa file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| plist="/tmp/BAMInfo.plist" | |
| zippath=`unzip -l $1 | egrep -o "Payload/.*app/Info.plist"` | |
| unzip -p $1 $zippath > $plist | |
| version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $plist` | |
| build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $plist` | |
| rm $plist | |
| echo "$version ($build)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment