Created
April 6, 2017 11:38
-
-
Save ajself/d11ac10666eb03ae0dcbedf43745d825 to your computer and use it in GitHub Desktop.
Update build numbers
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
# Update build number with number of git commits | |
# adapted from http://blog.curtisherbert.com/automated-build-numbers/ | |
buildNumber=$(git rev-list HEAD --count) | |
echo "Updating build number to $buildNumber" | |
dsym_plist="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
if [ -f "$DSYM_INFO_PLIST" ] ; then | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$dsymPlist" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment