前言
查閱網(wǎng)上有許多關(guān)于fastlane的文章,但是要不不全面,要不對(duì)新手不友好,甚至有些講解有錯(cuò)誤,自己在安裝過(guò)程中踩了很多坑,于是總結(jié)了下文關(guān)于fastlane的安裝與使用指南。
fastlane簡(jiǎn)介:
Git地址:Fastlane文檔地址:Fastlane Document
- Fastlane是一整套的客戶端CICD工具集合。Fastlane可以非??焖俸?jiǎn)單的搭建一個(gè)自動(dòng)化發(fā)布服務(wù),并且支持Android,iOS,MacOS。
- Fastlane命令執(zhí)行的底層并不是自己實(shí)現(xiàn)的,而是調(diào)用其他的插件或者工具執(zhí)行的。比如說(shuō)打包,F(xiàn)astlane中的gym工具只是xcodebuild工具的一個(gè)封裝,調(diào)用的其實(shí)還是xcodebuild中的打包命令。
- Fastlane本身沒有一套特殊語(yǔ)法,使用的Ruby語(yǔ)言。
- Fastlane的插件工具叫做action,每一個(gè)action都對(duì)應(yīng)一個(gè)具體的功能
一、faslane 安裝準(zhǔn)備
1 檢查Xcode項(xiàng)目是否為share
Xcode -> Manager Scheme -> 項(xiàng)目勾選??Shared
2 升級(jí)ruby版本保持2.5+(目前最新版本要求 ruby2.7.0+)
- 查看ruby版本
~ % ruby -v
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
- 若不滿足需要升級(jí)ruby
~ % brew install ruby
- 若已有ruby版本,升級(jí)后仍顯示舊版本,參考:
MacOS下,ruby安裝與正確版本及路徑設(shè)置
3 安裝Xcode command line tools
- 若已安裝,忽略
~ % xcode-select --install
4 安裝fastlane
1) 方法一:使用gem安裝fastlane
~ % sudo gem install fastlane -NV
Successfully installed fastlane-2.209.1
75 gems installed
2) 方法二:使用homebrew安裝fastlane
~ % brew install fastlane
查看fastlane當(dāng)前版本
~ % fastlane -v
fastlane installation at path:
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.1/bin/fastlane
-----------------------------
[?] ??
fastlane 2.209.1
3) 配置信息
- cmd+Shift+G 輸入~/.bash_profile 文件末尾添加配置如下:
#fastlane
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
5 安裝bundler
- 如果不安裝的話接下來(lái)的 bundle update 會(huì)失敗 報(bào)錯(cuò)。
- sudo是獲取管理員權(quán)限,接下來(lái)需要輸入開機(jī)密碼。
sudo gem install bundler:2.1.2
二、項(xiàng)目集成fastlane
1. 進(jìn)入你的項(xiàng)目所在根目錄
~ % cd ../Desktop/你的項(xiàng)目名
2. 初始化fastlane
~ % fastlane init
- 需要按提示輸入信息,中途會(huì)讓你輸入輸入開發(fā)者賬號(hào)和密碼,之后fastlane會(huì)自動(dòng)檢測(cè)當(dāng)前項(xiàng)目中App bundle name等,如果有問題可以選擇No,也或者待會(huì)去配置文件中修改(后面會(huì)講)。
- 其中,初始化時(shí)應(yīng)該會(huì)有如下選項(xiàng):
What would you like to use fastlane for?
1.Automate screenshots
2.Automate beta distribution to TestFlight
3.Automate App Store distribution
4.Manual setup - manually setup your project to automate your tasks
你想用fastlane做什么事情:
1 自動(dòng)截屏。(幫助我們截取App的顯示到appstore上的 截圖)
2 自動(dòng)發(fā)布beta到TestFlight上,用于內(nèi)測(cè)。
3 自動(dòng)打包發(fā)布到AppStore上。
4 手動(dòng)設(shè)置。
- 我選擇3,之后按提示操作,如果開發(fā)者賬戶中沒有創(chuàng)建同名項(xiàng)目會(huì)自動(dòng)創(chuàng)建好,且在本地項(xiàng)目文件夾下會(huì)自動(dòng)生成fastlane文件夾和一個(gè)Gemfile文件
3. 配置Gemfile
1) 修改Gemfile文件內(nèi)容
- 在2.中會(huì)自動(dòng)生成Gemfile文件
- 內(nèi)容如下
source "https://rubygems.org"
gem "fastlane" #初始化fastlane
gem "cocoapods" #如果項(xiàng)目中采用了cocoapods,需要自己加上
2) 更新Gemfile使生效
- 注意此時(shí)終端還是處于項(xiàng)目根目錄下
~ % bundle update
- 更新成功后,會(huì)生成Gemfile.lock文件
bundle update過(guò)慢解決方法:
- 方法一:終端設(shè)置代理
- 方法二:更改項(xiàng)目里Gemfile文件的source:
#source "https://rubygems.org"
source "https://ruby.taobao.org"
- 方法三:重啟大法=>不設(shè)置代理也不更改source,直接關(guān)閉終端,重新執(zhí)行bundle update等待,多次嘗試直到成功。
4. 配置Fastfile
1) Fastfile文件主要結(jié)構(gòu)如下:
fastlane_version "2.209.1" #指定fastlane使用的最小版本
default_platform(:ios) #支持 ios、android、mac
platform :ios do
before_all do #在執(zhí)行每個(gè)lane之前都會(huì)先執(zhí)行
cocoapods
end
desc "自定義test的描述"
lane :test do #名叫test的lane指令集合
end
desc "自定義beta的描述"
lane :beta do #名叫beta的lane指令集合
end
desc "自定義release的描述"
lane :release do #名叫release的指令集合
end
after_all do |lane| #每個(gè)lane執(zhí)行完之后會(huì)執(zhí)行這里
end
error do |lane, exception| #每個(gè)lane執(zhí)行出錯(cuò)會(huì)執(zhí)行
end
end
解釋:
- 每一個(gè)lane就是一個(gè)任務(wù),
- lane :自定義任務(wù)名
- lane :自定義任務(wù)名 do 和 end之間,是action組成的工作流
- 終端輸入 fastlane lane的自定義任務(wù)名,可執(zhí)行l(wèi)ane的do和end之間的任務(wù)
- 如下:(執(zhí)行名為test的lane任務(wù),沒有顯示??且finished successfully ??說(shuō)明成功)
~ % fastlane test
[?] ??
[15:00:01]: fastlane detected a Gemfile in the current directory
[15:00:01]: However, it seems like you didn't use `bundle exec`
[15:00:01]: To launch fastlane faster, please use
[15:00:01]:
[15:00:01]: $ bundle exec fastlane upload_toServer
[15:00:01]:
[15:00:01]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[15:00:03]: ----------------------------------------
[15:00:03]: --- Step: Verifying fastlane version ---
[15:00:03]: ----------------------------------------
[15:00:03]: Your fastlane version 2.209.1 matches the minimum requirement of 2.209.1 ?
[15:00:03]: ------------------------------
[15:00:03]: --- Step: default_platform ---
[15:00:03]: ------------------------------
[15:00:03]: Driving the lane 'mac upload_toServer' ??
+------+----------------------------+-------------+
| fastlane summary |
+------+----------------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
+------+----------------------------+-------------+
[15:00:03]: fastlane.tools finished successfully ??
2) 示例: 一個(gè)最簡(jiǎn)單的Fastfile文件配置內(nèi)容(ios項(xiàng)目打包.ipa)。
- 若為mac項(xiàng)目:替換ios為mac、替換.ipa為.app,替換為enterprise為mac-application。
- 若證書無(wú)企業(yè)版本,不能使用enterprise,測(cè)試包可用ad-hoc
default_platform(:ios) #支持 ios、android、mac
platform :ios do
desc "項(xiàng)目打包"
lane :beta do
#build_app()主要是編譯打包成ipa文件這個(gè)過(guò)程的相關(guān)操作
#gym主要是編譯打包成功后,對(duì)導(dǎo)出的IPA包的操作,gym中的相關(guān)參數(shù)可參考build_app中的參數(shù),因?yàn)閮烧叩膮?shù)基本一致
gym(
scheme:"項(xiàng)目名", # 如果有多個(gè)Target,需要指定scheme名
workspace: "項(xiàng)目名.xcworkspace", # 指定項(xiàng)目工作空間,如果項(xiàng)目使用CocoaPods需要加上
clean: true, # 是否編譯前clean
configuration: "Debug", # Release或Debug
output_name: "自定義", # 重命名導(dǎo)出包的名字(可不指定,不指定默認(rèn)項(xiàng)目名,注意若重命名會(huì)生成兩不同名的包,一個(gè)項(xiàng)目名一個(gè)自定義名)
output_directory:"./fastlane/build", # 自定義導(dǎo)出包的Copy目錄(若無(wú)自動(dòng)創(chuàng)建,可不指定,不指定默認(rèn)存到Xcode打包路徑:/Users/用戶名/Library/Developer/Xcode/Archives)
export_xcargs: "-allowProvisioningUpdates",# 啟用Xcode的自動(dòng)管理簽名功能,默認(rèn)是關(guān)閉的
export_method:"enterprise", # 打包方式(可選項(xiàng): app-store, validation, ad-hoc, package, enterprise, development, developer-id and mac-application)
)
end
end
3) 提交到第三方蒲公英服務(wù)器
- 配置Fastfile的蒲公英配置部分如下
pgyer(
api_key: "你蒲公英的api_key",
user_key: "你蒲公英的user_key"",
update_description: "fix something"
)
4) 提交到第三方firim服務(wù)器
- 配置Fastfile的firim配置部分如下
firim(
firim_api_token: '你在firim網(wǎng)站登錄后,點(diǎn)擊頭像,可以查看API token。復(fù)制到這地方'
)
5) 使用Ftp方式提交到服務(wù)器
- 配置Fastfile的ftp配置部分如下
ftp(
host: 'ftp.domain.com',
username: 'your username',
password: 'your password',
upload: {
src: ipa_src,
dest:"/xxx/"
}
)
6) 使用scp方式提交到服務(wù)器(自測(cè),目前使用的方法)
參考:scp配置
-
- 生成SSH Key并提交給服務(wù)器管理員,之后不需要再輸入賬號(hào)密碼。
- 使用腳本在終端執(zhí)行,測(cè)試服務(wù)器是否成功添加了本機(jī)SSHKey,腳本文件(xx.sh)內(nèi)容如下:
#!/bin/bash
#上傳文件到服務(wù)器
IPAPATH="/Users/用戶名/Desktop/demo.ipa" #本機(jī)ipa存放路徑
scp -r $IPAPATH root@xxx.xx.xxx.xxx:/服務(wù)器存放地址路徑/demo.ipa #-r代表替換,不加也是默認(rèn)替換
- 終端輸入如下命令(即腳本路徑直接拖入終端),直接回車執(zhí)行腳本即可。
- 若提示沒有權(quán)限 可以先賦權(quán)限 chmod +x 路徑,再拖入腳本回車執(zhí)行,如果用sh 路徑執(zhí)行可能有問題。
~ % chmod +x 腳本路徑/xx.sh
~ % 腳本路徑/xx.sh
-
- 配置Fastfile的scp配置部分如下:
- 注意:若為mac項(xiàng)目需要把.ipa改為.dmg
- dmg打包方法可參考文章下面的:7) mac項(xiàng)目打包成dmg
desc "2.上傳包文件到服務(wù)器(使用scp方式)"
lane :upload_toServer do
scp(
host: "xxx.xx.xxx.xxx", # 服務(wù)器ip地址,如180.10.200.200
username: "root", # 服務(wù)器用戶名
upload: {
src: "#{$outputDir}/#{$project_abbreviation}.ipa, #原始包文件地址,必須真實(shí)存在
dst: "/服務(wù)器提供的文件目錄/#{$project_abbreviation}.ipa" #服務(wù)器上傳的包文件地址,同名的話默認(rèn)每次上傳會(huì)替換該文件
}
)
end
- 3)項(xiàng)目路徑下添加SSH
~ % cd 項(xiàng)目路徑
~ % ssh-add
- 注意:如果不添加的話 fastlane upload_toServer 會(huì)報(bào)錯(cuò)
[18:50:51]: fastlane finished with errors
/Library/Ruby/Gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/ed25519_loader.rb:21:in
`raiseUnlessLoaded': OpenSSH keys only supported if ED25519 is available (NotImplementedError)
net-ssh requires the following gems for ed25519 support:
* ed25519 (>= 1.2, < 2.0)
* bcrypt_pbkdf (>= 1.0, < 2.0)
*
- 終端執(zhí)行代碼,使用faslane通過(guò)scp方式上傳工程包到服務(wù)器
~ % fastlane upload_toServer
[18:52:57]: fastlane.tools finished successfully ??
- 5)上傳成功后,可與服務(wù)器溝通獲得項(xiàng)目的下載地址。查看是否能正確下載項(xiàng)目
- 拿到地址后可以提供其他人進(jìn)行下載測(cè)試。
7) mac項(xiàng)目打包成dmg
注意:mac的.app包文件必須打包成dmg再通過(guò)scp上傳到服務(wù)器,否則服務(wù)器接收到的是許多文件的列表,而不是.app項(xiàng)目
1.安裝dmg插件:官方文檔具體可看
~ % fastlane add_plugin dmg
Successfully installed plugins
安裝完成后會(huì)更新項(xiàng)目中的Gemfile文件和./fastlane/Pluginfile文件
2.fastlane文件里打包dmg官方示例寫法:
dmg(path: "/some/myapp/", # required
output_path: "/some/myapp.dmg", # optional, by default will be at the same location as 'myapp' folder
volume_name: "myapp", # optional, by default will be the same as input folder name
filesystem: "hfs+", # optional, default is 'hfs+'
format: "udzo", # optional, default is 'udzo'
size: 10) # in megabytes, optional, by default will be calculated as input folder size + 10%
- 2.注意:不需要寫size,否則會(huì)報(bào)錯(cuò)且打包dmg失敗。
- 自測(cè)能成功打包dmg的寫法:(注意此時(shí)已有打包好的.app放到:項(xiàng)目路徑/fastlane/build/demoMac/demo.app)
dmg(
path: "./fastlane/build/demoMac", # 或./fastlane/build/demoMac/
output_path: "./fastlane/build/demoMac.dmg", # 可選,不寫默認(rèn)為 path.dmg
#volume_name: "demoMac", # 可選,不寫默認(rèn)為demoMac
#filesystem: "hfs+", # 可選, 默認(rèn) 'hfs+'
#format: "udzo", # 可選,默認(rèn) 'udzo'
)
* 補(bǔ)充知識(shí):hdiutil工具(fastlane的dmg封裝的是hdiutil工具命令,hdiutil為mac系統(tǒng)自帶)
- fastlane的dmg封裝的是hdiutil工具,hdiutil工具參考文章見hdiutil工具
終端直接使用hdiutil打包dmg示例:
- 先把需要封裝的.app文件放到文件夾里,如 /Desktop/MacDemoDMG/MacDemo/demo.app
~ % cd Desktop/MacDemoDMG
~ % hdiutil create -srcdir "MacDemo"/ -format UDRO "MacDemo.dmg"
......................................................................................................................
created: /Users/用戶名/Desktop/MacDemoDMG/MacDemo.dmg
- 成功會(huì)在/Users/用戶名/Desktop/MacDemoDMG/MacDemo.dmg看到打包好的dmg文件
六、Fastfile內(nèi)容完整示例
1.Fastfile打包ios項(xiàng)目(.ipa),內(nèi)容示例:
# 工程名
$project_name = "Demo-Test"
# 工程名縮寫
$project_abbreviation = "Demo"
# 項(xiàng)目scheme名
$scheme_name = "Demo-Appstore"
default_platform(:ios)
platform :ios do
desc "1.內(nèi)測(cè)版(enterprise)Debug打包并上傳服務(wù)器(方法四scp方式)"
lane :archive do
#打包的ipa存放路徑
outputDir = "./fastlane/build"
#打包的ipa名稱
outputName = "#{$project_abbreviation}"
# 1.1 打Debug包
gym(
scheme: "#{$scheme_name}", # 如果有多個(gè)Target,需要指定scheme名
workspace: "#{$project_name}.xcworkspace", # 如果項(xiàng)目使用CocoaPods需要加上
clean: true, # 是否編譯前clean
configuration: "Debug", # Debug或Release
output_directory: outputDir, # 自定義導(dǎo)出包的Copy目錄
output_name: outputName, # 重命名導(dǎo)出包的名字,若指定會(huì)生成兩個(gè)包
include_bitcode: true, # 是否開啟bitcode,Xcode默認(rèn)為true
include_symbols: true, # 是否生成符號(hào)表,Xcode默認(rèn)為true
silent: true, # 是否隱藏部分編譯細(xì)節(jié)
export_xcargs: "-allowProvisioningUpdates", # 啟用Xcode自動(dòng)簽名
export_method:"enterprise" # 打包方式(app-store, validation, ad-hoc, package, enterprise, development, developer-id and mac-application)
)
# 1.2 上傳1.1的已打包好的包文件(親測(cè)上傳方式四可行)
#上傳方式一:上傳ipa到firim服務(wù)器,需要先安裝firm插件
#firim(
#firim_api_token: '你在firim網(wǎng)站登錄后,點(diǎn)擊頭像,可以查看API token。復(fù)制到這地方'
#)
#上傳方式二:上傳ipa到蒲公英服務(wù)器,需要先安裝pgyer插件
#pgyer(
#api_key: "你蒲公英的api_key",
#user_key: "你蒲公英的user_key"",
#update_description: "fix something"
#)
#上傳方式三:上傳到Ftp服務(wù)器
#ftp(
#host: 'ftp.domain.com',
#username: 'your username',
#password: 'your password',
#upload: {
#src: ipa_src,
#dest:"/xxx/"
#}
#)
#上傳方式四:上傳ipa到公司的服務(wù)器,使用SSH key,需要讓服務(wù)器添加公玥
scp(
host: "xxx.xx.xxx.xxx", # 填寫你公司的服務(wù)器ip地址
username: "root", # 填寫你公司的服務(wù)器的用戶名
upload: {
src: "./fastlane/build/Demo.ipa", # 1.1中打好的ipa包本機(jī)所在地址
dst: "/填寫服務(wù)器提供的目錄/Demo.ipa" # 服務(wù)器提供的ipa存放路徑
}
)
#上傳方式五:上傳到testflight
#upload_to_testflight
#上傳方式六:上傳到appstore
#upload_to_app_store
end
end
2.Fastfile打包mac項(xiàng)目(.dmg),內(nèi)容示例:
# 工程名
$project_name = "Demo-Test"
# 工程名縮寫
$project_abbreviation = "Demo"
# 項(xiàng)目scheme名
$scheme_name = "Demo-Appstore"
default_platform(:mac)
platform : mac do
desc "1.Release打包并通過(guò)scp方式上傳到服務(wù)器"
lane :archive do
#打包的.app存放路徑
outputDir = "./fastlane/build/#{$project_abbreviation}"
# 1.1 編譯打包生成.app包文件
gym(
scheme: "#{$scheme_name}", # 如果有多個(gè)Target,需要指定scheme名
workspace: "#{$project_name}.xcworkspace", # 如果項(xiàng)目使用CocoaPods需要加上
clean: true, # 是否編譯前clean
configuration: "Release", # Debug或Release
output_directory: outputDir, # 自定義導(dǎo)出包的Copy目錄,默認(rèn)存放outputDir/項(xiàng)目名.app
export_xcargs: "-allowProvisioningUpdates", # 啟用Xcode自動(dòng)簽名
export_method:"mac-application" # 打包方式(app-store, validation, ad-hoc, package, enterprise, development, developer-id and mac-application)
)
# 1.2 對(duì)1.1中已經(jīng)打包好的.app進(jìn)行封裝,封裝成.dmg。
# 注意mac項(xiàng)目必須封裝成dmg,否則直接.app上傳到服務(wù)器是許多個(gè)文件列表。
dmg(
path: outputDir, # required
output_path: "#{outputDir}.dmg", # optional
#filesystem: "hfs+", # optional, default is 'hfs+'
#format: "udzo", # optional, default is 'udzo'
)
# 1.3 上傳1.2中已經(jīng)已經(jīng)封裝好的.dmg文件
scp(
host: "xxx.xx.xxx.xxx", # 填寫你公司的服務(wù)器ip地址
username: "root", # 填寫你公司的服務(wù)器的用戶名
upload: {
src: "./fastlane/build/Demo.dmg", # 1.1中打好的.dmg包本機(jī)所在地址
dst: "/填寫服務(wù)器提供的目錄/Demo.dmg" # 服務(wù)器提供的.dmg存放路徑
}
)
end
end
3.fastlane使用:使用腳本啟動(dòng)fastlane的命令
~ % cd 項(xiàng)目路徑
~ % touch ./fastlane/Fastlane.sh
~ % open ./fastlane/Fastlane.sh
在新建的Fastlane.sh腳本(shell)文件里填寫內(nèi)容如下:
#!/bin/bash
ssh-add #若使用sshkey上傳服務(wù)器,必須加否則會(huì)失敗
fastlane archive #打包并上傳
- 填寫后保存,在終端直接執(zhí)行該腳本文件即可
~ % cd 項(xiàng)目路徑
~ % sh ./fastlane/Fastlane.sh
七、補(bǔ)充知識(shí):gym和build_app
1.gym
gym: Easily build and sign your app (via gym)
gym is part of fastlane: The easiest way to automate beta deployments and releases for your iOS and Android apps.
What's gym?
gym builds and packages iOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed ipa or app file ??
解釋
1、gym可以幫助你編譯和打包安卓和iOSapp,它是fastlane的一部分,其中ios程序打包成.ipa包,mac程序打包成.app包。
2、gym工具只是xcodebuild工具的一個(gè)封裝,gym使用ruby編寫,相對(duì)于xcodebuild的寫法更簡(jiǎn)單易用1。
2.build_app
- 許多參數(shù)和gym相同,直接使用gym即可。
八、關(guān)于fastlane版本升級(jí)
- 目前fastlane最新版本是2.211.0,我的版本是2.209.1,所以涉及到升級(jí)。
+------+---------------------+-------------+
| fastlane summary |
+------+---------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------+-------------+
| 1 | Verifying fastlane | 0 |
| | version | |
| 2 | default_platform | 0 |
| ?? | gym | 52 |
+------+---------------------+-------------+
[10:09:45]: fastlane finished with errors
[!] Error building the application - see the log above
#######################################################################
# fastlane 2.211.0 is available. You are on 2.209.1.
# You should use the latest version.
# Please update using `gem install fastlane`.
#######################################################################
2.211.0 Improvements
- 如上所示,fastlane打包時(shí)出現(xiàn)錯(cuò)誤,提示升級(jí),按照提示進(jìn)行升級(jí),提示錯(cuò)誤,解決方法是使用管理員權(quán)限進(jìn)行升級(jí)
~ % gem install fastlane
Fetching fastlane-2.211.0.gem
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
正確的升級(jí)方法
sudo gem install fastlane -NV
輸入開機(jī)密碼回車即可
其它補(bǔ)充
- 查看fastlane當(dāng)前最新版本號(hào)
~ % fastlane version
- 查看本機(jī)安裝的fastlane版本
~ % fastlane -v
fastlane installation at path:
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.211.0/bin/fastlane
-----------------------------
[?] ??
fastlane 2.211.0
- 若fastlane 打包一直不成功,可嘗試刪除項(xiàng)目現(xiàn)有fastlane文件夾和Gemfile、Gemfile.lock文件,再重新開始fastlane init
fastlane 升級(jí)后 還是舊版本
- 使用gem升級(jí)fastlane后,如果fastlane -v還是舊版本,是因?yàn)榕渲寐窂降膯栴},電腦優(yōu)先搜索了根目錄路徑,而沒有搜索gem中最新版的fastlane。
解決辦法:
- 先查看本機(jī)fastlane路徑,再查看gem的fastlane路徑,然后cmd+shift+G 輸入定位到gem的fastlane路徑即 /usr/local/lib/ruby/gems/3.3.0/gems/fastlane-2.220.0,找到bin/fastlane這個(gè)Unix可執(zhí)行文件,直接復(fù)制覆蓋到/usr/local/bin/fastlane中即可
~ % which fastlane
/usr/local/bin/fastlane
~ % gem which fastlane
/usr/local/lib/ruby/gems/3.3.0/gems/fastlane-2.220.0/fastlane/lib/fastlane.rb
參考
fastlane 在mac上配置iOS自動(dòng)化上架