关于Jekins打包

2020-09-07  本文已影响0人  勇往直前888

这边Jekins打包是用插件的,自从Xcode8之后,签名的事情一直搞不定,自动打包一直不行。

开发这边也帮忙查看,一直不成功,几乎是没办法了。

这时我想到上家公司的时候,也是用Jekins打包的,所以问了一下以前的同事。

简单交流之后,让对方将相关的命令行发了过来

这里改了一下,用命令行是成功了。

虽然是最简单的几条Xcode脚本命令,不过在这种场景下,还是成功了。

今天算临时版本发布,虽然没我什么事,不过我也留下来坚持了,发版日都是要加班的

参考的脚本:

xcodebuild clean -workspace ./ZAInsurance.xcworkspace -scheme ZAInsurance
xcodebuild -workspace ./ZAInsurance.xcworkspace -scheme ZAInsurance -configuration Release archive -archivePath ./archive
channels=( Production UAT Test )
j=0
date=$(date +%y%m%d)
datetime=$(date +%y%m%d%H%M)
for i in ${channels[@]}
do
((j+=1))
/usr/libexec/PlistBuddy -c "Set :ZAIEnvironment ""$i" ./archive.xcarchive/Products/Applications/*.app/info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ""$datetime.$j" ./archive.xcarchive/Products/Applications/*.app/info.plist
rm -Rf ~/Desktop/$date/$datetime$i.ipa
xcodebuild -exportArchive —exportFormat ipa -archivePath ./archive.xcarchive -exportPath ~/Desktop/$datetime$i.ipa -exportWithOriginalSigningIdentity
chmod 744 ~/Desktop/$datetime$i.ipa
done

这边的脚本:

agvtool mvers -terse1
agvtool new-marketing-version 2.0.8
agvtool new-version -all 2.0.8.${BUILD_NUMBER}.test
rm -rf ${WORKSPACE}/build
xcodebuild clean -workspace ${WORKSPACE}/ifaex_ios.xcworkspace -scheme ifaex_ios
xcodebuild -workspace ${WORKSPACE}/ifaex_ios.xcworkspace -scheme ifaex_ios -configuration Debug archive -archivePath ${WORKSPACE}/build/ifaex_ios
xcodebuild -exportArchive —exportFormat ipa -archivePath ${WORKSPACE}/build/ifaex_ios.xcarchive -exportPath ${WORKSPACE}/build/ifaex_ios -exportWithOriginalSigningIdentity
cd ${WORKSPACE}/build/ifaex_ios.xcarchive/dSYMs && zip -r ${WORKSPACE}/build/ifaex_ios-dSYM.zip ./
上一篇下一篇

猜你喜欢

热点阅读