一晾蜘、 Fastlane 是什么?
Fastlane 是一套使用Ruby寫的自動化工具集笙纤,旨在簡化Android和iOS的部署過程,自動化你的工作流省容。它可以簡化一些乏味、單調(diào)燎字、重復(fù)的工作阿宅,像截圖笼蛛、代碼簽名以及發(fā)布App
Fastlane開發(fā)文檔: https://docs.fastlane.tools/
二、應(yīng)用
-
安裝xcode命令行工具
xcode-select --install
-
安裝Fastlane
sudo gem install -n /usr/local/bin fastlane
-
初始化往湿,cd 到你的項目目錄執(zhí)行, 執(zhí)行完,之后有個選項领追,選擇 4,自定義配置
fastlane init
-
配置 Fastfile, 在項目目錄中绒窑,找到 fastlane/Fastfile舔亭,修改內(nèi)容如下
default_platform(:ios) platform :ios do desc "打包到蒲公英" lane :beta do build_app(export_method: "development") pgyer(api_key: "", user_key: "",password: "123", install_type: "2",update_description: "修復(fù)bug") end end
api_key、user_key :在蒲公英賬號的
應(yīng)用管理
-App概述
-API
中可以找到钦铺,并替換到以上相應(yīng)的位置。
password: 安裝密碼update_description: 版本更新時的描述信息
-
安裝蒲公英的 fastlane 插件
fastlane add_plugin pgyer
-
打包并上傳到蒲公英
fastlane beta
三矛洞、常見問題
-
gem ruby源已更新為 https://gems.ruby-china.com,確保只有 gems.ruby-china.com
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ gem sources -l