# method,打包的方式。方式分别为 development, ad-hoc, app-store, enterprise 。必填 echo "Place enter the number you want to export ? \033[33;1m [1:app-store 2:ad-hoc 3:development 4:enterprise 5:gitlog]\033[0m"
read number while([[ $number != 1 ]] && [[ $number != 2 ]] && [[ $number != 3 ]] && [[ $number != 4 ]] && [[ $number != 5 ]]) do echo "Place enter the number you want to export ? \033[33;1m [1:app-store 2:ad-hoc 3:development 4:enterprise 5:gitlog]\033[0m" read number done
# 检查文件是否存在 if [ -f "$export_ipa_path/$ipa_name.ipa" ] ; then echo "\033[32;1m导出 ${ipa_name}.ipa 包成功 🎉 🎉 🎉 \033[0m" # open $export_path else echo "\033[31;1m导出 ${ipa_name}.ipa 包失败 😢 😢 😢 \033[0m" exit1 fi
# 删除export_options_plist文件(中间文件) if [ -f "$export_options_plist_path" ] ; then #echo "${export_options_plist_path}文件存在,准备删除" rm -f $export_options_plist_path fi
#导出dSYM并压缩 zip cp -r "${dSYM_path}""${export_path}" zip -r "$zip_dSYM_path""$new_dSYM_path" rm -r $new_dSYM_path