Last active
August 29, 2015 14:27
-
-
Save MaciejGad/93eec94b57ee707d758a 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
if [ "$CONFIGURATION" = "Ad hoc" ] || [ "$CONFIGURATION" = "Release" ]; then | |
echo "Bumping build number..." | |
plist=${PROJECT_DIR}/${INFOPLIST_FILE} | |
buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}") | |
if [[ "${buildnum}" == "" ]]; then | |
echo "No build number in $plist" | |
exit 2 | |
fi | |
buildnum=$BUILD_NUMBER #$(expr $buildnum + 1) | |
/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "${plist}" | |
echo "Bumped build number to $buildnum" | |
else | |
echo $CONFIGURATION " build - Not bumping build number." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment