Jekins安装看上一篇
www.jianshu.com/p/4355008cabcd
脚本打包
选择Execute shellxcodebuild 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放在工程根目录内
上传蒲公英
# 工程名
APP_NAME="XXX"
#userKey和apiKey需要在蒲公英的账号设置中查找
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
网友评论