M1电脑Dev打包脚本

打Dev包出现了BUG

https://blog.csdn.net/YLGWHYH/article/details/119038159

-destination 'generic/platform=iOS'

示例代码

#!/bin/bash
export LANG=en_US.UTF-8
#参考自 https://github.com/qindeli/WorksapceShell
#注意:脚本和WorkSpace必须在同一个目录
#工程名字(Target名字) 2021-04-30 21:10:48
Project_Name="name"
IPA_Name="ipa_name"

#workspace的名字
Workspace_Name="workspacename"
#配置环境,Release或者Debug,默认release
Configuration="Release"
#IPA存放的地址
IPA_Save_Path="/Users/${USER}/Desktop/${Project_Name}"_$(date +%m%d_%H%M%S)

#导出IPA需要的配置文件plist
PlistPath=./DevExportOptions.plist
PlistPath=${PlistPath}

if [ -n "$1" ]; then
    echo "更新了:$1"
else
    echo "请输入更新日志"
    exit;
fi

# 打包
xcodebuild -workspace $Workspace_Name.xcworkspace -scheme $Project_Name -configuration $Configuration -archivePath build/$Project_Name-build.xcarchive clean archive -destination 'generic/platform=iOS'
# 导出IPA
xcodebuild -exportArchive -archivePath build/$Project_Name-build.xcarchive -exportOptionsPlist ${PlistPath} -exportPath $IPA_Save_Path -allowProvisioningUpdates YES

# 获取更新日志
# git log -2 --pretty=format:"%H %s" > build/log.log

# 复制 dSYMs 文件
cp -R build/$Project_Name-build.xcarchive/dSYMs $IPA_Save_Path
# 删除build目录
rm -rf build

DevExportOptions.plist





    compileBitcode
    
    destination
    export
    method
    development
    provisioningProfiles
    
        package.name
        provisioningProfiles UUID
    
    signingCertificate
    Apple Development
    signingStyle
    manual
    stripSwiftSymbols
    
    teamID
    teamID_Value
    thinning
    <none>


导出编译时间文件

#!/bin/bash
export LANG=en_US.UTF-8

Project_Name="BreathLive"
#workspace的名字
Workspace_Name="BreathLive"
# 打包
xcodebuild -workspace $Workspace_Name.xcworkspace -scheme $Project_Name -destination 'generic/platform=iOS' clean build OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" > build_log.txt

grep '^\d*\.\d*ms' build_log.txt > build_time.log

你可能感兴趣的:(M1电脑Dev打包脚本)