Created
September 22, 2015 11:14
-
-
Save forbze/e1aacd2b123a616196b1 to your computer and use it in GitHub Desktop.
This file contains 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
git=$(sh /etc/profile; which git) | |
number_of_commits=$("$git" rev-list HEAD --count) | |
bundle_version=$number_of_commits | |
target_plist="$TARGET_BUILD_DIR/$INFOPLIST_PATH" | |
dsym_plist="$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist" | |
for plist in "$target_plist" "$dsym_plist"; do | |
if [ -f "$plist" ]; then | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bundle_version" "$plist" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment