1. 程式人生 > >Jenkins shell 指令,不需要配置xcode外掛

Jenkins shell 指令,不需要配置xcode外掛

echo 'start build JenkinsTest'

pwd

whoami

export LANG=en_US.UTF-8

export LANGUAGE=en_US.UTF-8

export LC_ALL=en_US.UTF-8

#工程環境路徑

workspace_path=./JenkinsTest/

#專案名稱

project_name="JenkinsTest"

#echo"1.----update----"

#pod install --verbose --no-repo-update

#echo "2.clean...................."

xcodebuild clean

rm -rf archive

rm -f $project_name.ipa

#echo "3.dabao...................."

sed -i '' 's/\app-store\<\/string\>/\development\<\/string\>/' archieveOpt.plist

sed -i '' 's/ProvisioningStyle = Automatic;/ProvisioningStyle = Automatic;/' $project_name.xcodeproj/project.pbxproj

#echo "4.shengcheng app"

xcodebuild archive -workspace $project_name.xcworkspace -scheme $project_name -configuration Release -archivePath release-iphones/$project_name.xcarchive

#echo "5.shengcheng  ipa"

xcodebuild -exportArchive -exportOptionsPlist archieveOpt.plist -archivePath release-iphones/$project_name.xcarchive -exportPath ./release-iphones/ -configuration Release