-
-
Save byaruhaf/1944bee9098d66b7d6da42156bfa3739 to your computer and use it in GitHub Desktop.
Shell script to update the build number (CFBundleVersion) of the info.plist in the build folder.
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
# Shamelessly ripped of from https://blog.curtisherbert.com/automated-xcode-build-numbers-early-2019-edition/ | |
# | |
git=`sh /etc/profile; which git` | |
bundleVersion=`"$git" rev-list --all | wc -l | tr -d '[:space:]'` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bundleVersion" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
echo "☛ BUILD NUMBER: ${bundleVersion}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment