Ios-app Automatic package Upload dandelion Shell version __ios

Source: Internet
Author: User
Tags git clone
#!/usr/bin/env Bash # name:admin echo "~~~~~~~~~~~~~~~~ starts executing script ~~~~~~~~~~~~~~~~" #开始时间 begintime= ' date +%s ' date= ' Date ' +% Y-%m-%d-%t ' #需要编译的 targetName target_name= "wheatmoneymanagement" #编译模式 project defaults to Debug release configuration_target= Release #编译路径 buildpath=/opt/demo/build/${target_name}_${date} #archivePath archivepath=${buildpath}/${target_name

plist adhocexportoptionsplist=${archivepath}/info.plist}.xcarchive #输出的ipa目录 ipapath=/users/admin/desktop #导出ipa required Exportoptionsplist=${adhocexportoptionsplist} # Whether to upload Dandelion uploadpgyer=true # git project branch number breach=v2.0.0 git clone-b $breach Project Git address echo "~~~~~~~~~~~~~~~~ started building ~~~~~~~~~~~~~~~~~~~" #开始构建 xcodebuild archive-workspace ${target_name}.xcworkspace \-scheme ${target_name} \-archivepath ${archivepath} \-configuration ${configuration_target} echo ~~~~~~~~~~~~~~~~ check Build Success ~~~~~~~~~~~~~~~~~~~ "# xcarchive is actually a folder is not a file so use-D to judge if [D" $ARCHIVEPATH "] then echo" Build success ... "Else echo "Build failed ..." Rm-rf $BUILDPATH exit 1 fi endtime= ' Date +%s ' archivetime= build time $[endtime-begintime] sec ' echo ' ~~~~~~~~~~~~~~~~ export ipa~~~~~~~~~~~~~~~~~~~ ' begintime= ' date +%s ' xcodebuild-exportarchive \-archivepath ${archivepath} \-exportoptionsplist ${exportoptionsplist} \-exportPath $ {Ipapath} echo ' ~~~~~~~~~~~~~~~~ Check for successful export of ipa~~~~~~~~~~~~~~~~~~~ ' Ipapath=${ipapath}/${target_name}.ipa if [f ' $ Ipapath "] then echo" Export IPA success ... "Else echo" Export IPA failed ... "# End time Endtime= ' Date +%s ' echo $ArchiveTime ' echo ' to export IPA time $[Endtime-begintime] sec "Exit 1 fi endtime= ' date +%s ' exporttime=" Export IPA time $[endtime-begintime] seconds "# upload dandelion If [$ Uploadpgyer = True]; Then echo "~~~~~~~~~~~~~~~~ upload IPA to dandelion ~~~~~~~~~~~~~~~~~~~" curl-f "file=@ $IPAPATH" \ F "Ukey=9c86dd6f*******d7 D784e841d91 "\ f" _api_key=220fd5e840f******bdb80e2e80 "\ F" password= dandelion password "\ https://www.pgyer.com/apiv1/a Pp/upload If [$ = 0] then echo-e "\ n" echo "~~~~~~~~~~~~~~~~ upload dandelion Success ~~~~~~~~~~~~~~~~~~~" Else EC
Ho-e "\ n"        echo "~~~~~~~~~~~~~~~~ upload dandelion failed ~~~~~~~~~~~~~~~~~~~" fi fi echo "~~~~~~~~~~~~~~~~ configuration information ~~~~~~~~~~~~~~~~~~~" Echo "Start script time: ${date}" echo "compilation Mode: ${configuration_target}" echo "Export IPA configuration: ${exportoptionsplist}" echo "Package file path: ${archivepa
 TH} "echo" Exports IPA path: ${ipapath} "echo" $ArchiveTime "echo" $ExportTime "Exit 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.