Xcode Build 号自动增加脚本

996.icu

#!/bin/bash
if [ "Release" != "${CONFIGURATION}" ]; then

exit

else

buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")

buildNumber=$(($buildNumber + 1))

/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"

fi

你可能感兴趣的:(Xcode Build 号自动增加脚本)