Skip to content

Instantly share code, notes, and snippets.

@MaciejGad
Last active August 29, 2015 14:27
Show Gist options
  • Save MaciejGad/93eec94b57ee707d758a to your computer and use it in GitHub Desktop.
Save MaciejGad/93eec94b57ee707d758a to your computer and use it in GitHub Desktop.
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