Xcodebuild Compiling IPA

Source: Internet
Author: User

#!/bin/sh# autobuild.sh# ctest## Created by Ethan on 14-11-3.# Copyright (c) 2014 Ethan. All rights reserved.############################################### #使用方法 #./build.sh arg1 arg2 arg3 The path of the project, For example:/volumes/work/buildcommand/test/ctest#arg2 compile ID#ARG3 for the project to complete the callback address #arg4 Company Project Special Usage # The server needs to modify the source ###################### ######################################################################## #回调函数function Fcallback () {echo $ #1/-1 EC Ho #buildID echo $ #http://www.baidu.com#echo ${logpath}# Echo ${ipapath} url= "${3}?status=${1}&buildid=${2} &logger=${logpath}&package=${ipapath} "#echo $url curl $url}############################################## # #参数检查if [-Z "$"]; Thenecho "ERROR: Project path is empty" Exit 1fiif [-Z "$"]; Thenecho "ERROR: Project compilation ID is empty" exit 1fiif [-Z "$"]; Thenecho "ERROR: Callback address is empty" Exit 1fiif [-Z "$4"]; Thenecho "Error: Certificate number is empty" Exit 1fi# log Address logpath= "${1}/log.txt" #ipa地址ipaPath = "${1}/${2}.ipa" ######################### ##################### #证书检查PROFILE_FILE = "/VOlumes/${4}.mobileprovision "Echo $PROFILE _fileuuid= '/usr/libexec/plistbuddy-c ' print:uuid '/dev/stdin <<< $ (Security cms-d-I ${profile_file}) ' If [-Z ' $UUID ']; Thenecho "error: Certificate not found" Exit 1fiecho $UUIDCP ${profile_file} "$HOME/library/mobiledevice/provisioning Profiles/${uuid} . mobileprovision "############################################### #清理项目cd $1xcodebuild clean###################### ######################### #编译并将日志写到文件 formal use needs to be modified PROVISIONING_PROFILEXCODEBUILD-SDK Iphoneos provisioning_profile=${  UUID} > ${logpath} #判断是否编译成功if [[$-eq 0]]; Then echo "Build success" Else echo "Build Error" Fcallback "-1" $ $ $ exit 2fi################################  ############### #生成ipaxcrun-sdk iphoneos packageapplication-v./build/release-iphoneos/*.app-o ${ipaPath}if [[$?-eq 0  ]]; THENRM-RF Buildecho "Create IPA Success" Fcallback "1" $ $3exit 0elseecho "Create IPA Error" fcallback "-1" $ $3exit 2fi

  

Xcodebuild Compiling IPA

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.