美文网首页
shell脚本打包IPA文件

shell脚本打包IPA文件

作者: HardCabbage | 来源:发表于2017-09-21 16:03 被阅读0次

#!/bin/sh

#  Created by ZCD on 2017/09/21.

#  Copyright © 2017年 ZCD. All rights reserved.

#注意:变量赋值的时候=号之间不能有空格

workspace="TargetName.xcworkspace"

scheme="TargetName"

#桌面路径

desktop="${HOME}/Desktop"

#输出路径

outputPath="${desktop}/文件名"

echo "输出路径:${outputPath}"

echo "*******************清理*******************"

xcodebuild -workspace $workspace -scheme $scheme clean

echo "*******************清理完成*******************"

编译

echo "*******************开始编译*******************"

xcodebuild  -workspace  $workspace -scheme $scheme -configuration "release"

echo "*******************编译成功*******************"

echo "*******************开始打包ipa*******************"

xcodebuild archive -workspace $workspace -scheme "TargetName" -archivePath "${outputPath}/TargetName.xcarchive"

xcodebuild -exportArchive -archivePath "${outputPath}/TargetName.xcarchive" -exportPath "${outputPath}" -exportOptionsPlist "TargetName/Info.plist"

rm -r -f "${outputPath}/TargetName.xcarchive"

rm -r -f "${outputPath}/DistributionSummary.plist"

rm -r -f "${outputPath}/ExportOptions.plist"

rm -r -f "${outputPath}/Packaging.log"

echo "*******************打包ipa成功*******************"

相关文章

网友评论

      本文标题:shell脚本打包IPA文件

      本文链接:https://www.haomeiwen.com/subject/rmxtextx.html