Jekins安裝看上一篇
www.reibang.com/p/4355008cabcd
腳本打包
xcodebuild clean -workspace XXX.xcworkspace -scheme XXX
xcodebuild -workspace XXX.xcworkspace -scheme XXX -configuration Release archive -archivePath ./archive PROVISIONING_PROFILE=developmentProvision.mobileprovision
rm -fr build
xcodebuild -exportArchive -archivePath ./archive.xcarchive -exportPath build -exportOptionsPlist ExportOptions.plist
將developmentProvision.mobileprovision、ExportOptions.plist放在工程根目錄內(nèi)
上傳蒲公英
# 工程名
APP_NAME="XXX"
#userKey和apiKey需要在蒲公英的賬號設(shè)置中查找
userKey="xxxx"
apiKey="xxxx"
#蒲公英打包
curl -F "file=@${WORKSPACE}/build/${APP_NAME}.ipa" \
-F "uKey=${userKey}" \
-F "_api_key=${apiKey}" \
-F "updateDescription=$DESCRIPTION" \
-F "isPublishToPublic=2" \
http://www.pgyer.com/apiv1/app/upload