fastlane官方教程
fastlane.
fastlane docs.
fastlane Getting Started guide for iOS
fastlane Getting Started guide for Android
自己感觉如果是单个项目来说使用fastlane来打包要比jenkins要简便一些,最起码配置要简单的多了。
Installation
Make sure you have the latest version of the Xcode command line tools installed:
xcode-select --install
Choose your installation method:
![](https://img.haomeiwen.com/i3334822/85df7d18ef780f39.png)
这里我使用的是第一种通过Homebrew安装的
$ sudo gem install fastlane --verbose(推荐使用这个方法安装fastlane)
brew cask install fastlane(这种方法安装会出现找不到fastlane的问题)
安装过程需要耐心等待
![](https://img.haomeiwen.com/i3334822/795b5a30af854987.png)
然后需要执行
export PATH="$HOME/.fastlane/bin:$PATH"
![](https://img.haomeiwen.com/i3334822/afd63afcb764bb5f.png)
这样就安装完成了,你可以输入
fastlane env
Please update using fastlane update_fastlane
$ fastlane update_fastlane
Setting up fastlane
Navigate your terminal to your project's directory and run for Ruby setup:
$ fastlane init
Building your app
这里我简单的打一个ipa
1、编辑Appfile文件
app_identifier "com.JingJiRiBao.com" # The bundle identifier of your app
apple_id "299_xh_dbs_apple@xinhuamm.net" # Your Apple email address
team_id "R2U8SE68WE" # Developer Portal Team ID
# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
2、编辑Fastfile文件
lane :beta do
gym(scheme: "JingJiRiBao", # Build your app - more options available
clean:true, # 在构建前先clean
configuration:"Release", # 配置为Release版本
export_method:"enterprise", # export_method默认是"appstore"
)
end
3、执行命令
$ fastlane beta
![](https://img.haomeiwen.com/i3334822/823e8c3bd248f523.png)
4、错误处理
![](https://img.haomeiwen.com/i3334822/e18ceaaf9e1be27e.png)
5、学习
![](https://img.haomeiwen.com/i3334822/5851d54a2aaadb72.png)
网友评论