美文网首页
如何在archive后设置 build version 自动加1

如何在archive后设置 build version 自动加1

作者: _烩面_ | 来源:发表于2020-03-17 00:52 被阅读0次

来,先看下执行脚本

if [ $ACTION == install ]; then
echo "Bumping build number..."
echo $ACTION
plist=${PROJECT_DIR}/${INFOPLIST_FILE}
 
#increment the build number (ie 115 to 116)
buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}")
if [[ "${buildnum}" == "" ]]; then
echo "No build number in $plist"
exit 2
fi
 
buildnum=$(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

在哪里加这段脚本呢? 如下

dem.jpg

Job done !Farewell !

相关文章

网友评论

      本文标题:如何在archive后设置 build version 自动加1

      本文链接:https://www.haomeiwen.com/subject/qdbaehtx.html