1 cd 项目根目录
fastlane init
复制代码
2 选择自定义 3 配置文件
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
#targets = ['ElbC', 'ElbT', 'ElbF']
targets = ['ElbALL', 'ElbC', 'ElbC online', 'ElbF', 'ElbF online', 'ElbT', 'ElbT online']
ALL_DIR = Time.now.strftime("%Y-%m-%d %H:%M:%S")
platform :ios do
desc "ElbT 测试版本"
lane :ElbT do
gym(scheme:"ElbT",
export_method:"enterprise",
output_directory:"~/Desktop/App/ElbT/",#文件路径
output_name:"ElbT--#{ALL_DIR}.ipa"
)
end
lane :all do
targets.each do |t|
gym(scheme:t,
export_method:"enterprise",
output_directory:"~/Desktop/App/All/#{ALL_DIR}/",#文件路径
output_name:"#{t}--#{ALL_DIR}.ipa"
)
end
end
end
复制代码
4 执行 终端切换至项目下的fastlane
4.1 文件介绍 Appfile内部是个人开发者账号的配置 Fastfile 定义的是一个个的lane,执行不同的打包操作操作实例 单个打包 ElbT
fastlane ElbT
一键打包所有 fastlane all
5 打包过程
6 结束