fir打包后 一键上传dSYM到Bugly

Bugly

Bugly提供了上传符号表的API接口(使用POST方式上传):

https://api.bugly.qq.com/openapi/file/upload/symbol
HTTPS接口支持上传dSYM文件(需要压缩成Zip文件)和符号表文件(Symbol)。

仅需在archive成功后拿到dSYM将其压缩zip然后上传即可。

#!/bin/sh
#pod install --no-repo-update

out_path=`date "+%Y-%m-%d-%H-%M-%S"`

if [ ! -d "./fir_build_debug_ipa" ]; then
mkdir ./fir_build_debug_ipa
fi

mkdir ./fir_build_debug_ipa/$out_path

if [ $# -eq 0 ]
then

fir b ./ -w -S DaBoLuo -p -T xxxxxxx -C Debug -c 发布Debug版本 PROVISIONING_PROFILE_VALUE="Automatic" DEVELOPMENT_TEAM=xxx -o ./fir_build_debug_ipa/$out_path
else
a=$*
echo $a

fir b ./ -w -S DaBoLuo -p -T xxxxxx -C Debug -c $a PROVISIONING_PROFILE_VALUE="Automatic" DEVELOPMENT_TEAM=xxxx -o ./fir_build_debug_ipa/$out_path
fi

cd $PWD/fir_build_debug_ipa/$out_path
zip -r DaBoLuo.app.dSYM.zip DaBoLuo.app.dSYM

curl -k "https://api.bugly.qq.com/openapi/file/upload/symbol?app_key=xxx&app_id=xxx" --form "api_version=1" --form "app_id=xxx" --form "app_key=xxx" --form "symbolType=2"  --form "bundleId=com.xxx" --form "productVersion=1.0.1" --form "fileName=DaBoLuo.app.dSYM.zip" --form "[email protected]"

你可能感兴趣的:(fir打包后 一键上传dSYM到Bugly)