這邊Jekins打包是用插件的,自從Xcode8之后皆警,簽名的事情一直搞不定拦宣,自動打包一直不行。
開發(fā)這邊也幫忙查看信姓,一直不成功鸵隧,幾乎是沒辦法了。
這時我想到上家公司的時候意推,也是用Jekins打包的豆瘫,所以問了一下以前的同事。
簡單交流之后菊值,讓對方將相關的命令行發(fā)了過來
這里改了一下外驱,用命令行是成功了。
雖然是最簡單的幾條Xcode腳本命令腻窒,不過在這種場景下昵宇,還是成功了。
今天算臨時版本發(fā)布儿子,雖然沒我什么事瓦哎,不過我也留下來堅持了,發(fā)版日都是要加班的
參考的腳本:
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 ./