在run Pre-actions新建脚本
image.png
cd ${PROJECT_DIR}
echo `pwd`
d_Project_Name="mx2app"
Pbxproj_Path="./${d_Project_Name}.xcodeproj/project.pbxproj"
buildNumber=$(date +%Y%m%d%H%M%S)
echo ${buildNumber}
#agvtool new-marketing-version ${buildNumber} 无故 build cancel
sed -i "" "s/CURRENT_PROJECT_VERSION = .*;/CURRENT_PROJECT_VERSION = ${buildNumber};/g" ${Pbxproj_Path}
网友评论