Shell实现iOS项目build打包后自动+1
把下面的代码放到run Script中,感兴趣的,代码不懂的可以学一下shell!
# Type a script or drag a script file from your workspace to insert its path. if [ $CONFIGURATION == Release ]; then echo "当前为 Release Configuration,开始自增 Build" plist=${INFOPLIST_FILE} buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}") if [[ "${buildnum}" == "" ]]; then echo "Error:在Plist文件里没有 Build 值" exit 2 fi buildnum=$(expr $buildnum + 1) /usr/libexec/PlistBuddy -c "Set CFBundleVersion $buildnum" "${plist}" else echo $CONFIGURATION "当前不为 Release Configuration" fi
相关推荐
laisean 2020-11-11
Julyth 2020-10-16
laisean 2020-09-27
flycappuccino 2020-09-27
liguojia 2020-09-27
tianhuak 2020-11-24
huha 2020-10-16
lianshaohua 2020-09-23
zhangjie 2020-11-11
大牛牛 2020-10-30
firefaith 2020-10-30
liguojia 2020-10-20
wangzhaotongalex 2020-10-20
以梦为马不负韶华 2020-10-20
CARBON 2020-10-20
彼岸随笔 2020-10-20
lianshaohua 2020-10-20
yutou0 2020-10-17
JohnYork 2020-10-16