美文网首页
iOS开发:自动化编译(fastlane)

iOS开发:自动化编译(fastlane)

作者: Jason_hzb | 来源:发表于2019-05-16 22:12 被阅读0次

一、摘要

fastlane:一系列工具的集合。比如match工具能管理证书,deliver能提交APPStore审核。

二、工具安装

rvm -v

ruby -v

fastlane -v

xcode-select --install xcode命令行工具

三、操作

蒲公英在Fastlane是作为一个插件存在的,所以要打包到蒲公英必须先安装蒲公英的插件。

(1)、打开终端,cd 工程路径

fastlane add_plugin pgyer

(2)、工程fastlane初始化

fastlane init

1、Automate screenshots(自动化截图)

2、Automate beta distribution to TestFlight(TestFlight)

3、Automate App Store distribution(appStore发布版本)

4、Manual setup - manually setup your project to automate your tasks(自定义)

(3)、打包并上传到蒲公英命令:

fastlane test desc:测试打包

四、配置

default_platform(:ios)

platform :ios do
  desc "蒲公英测试版"
  lane :test do |options| # option用于接收我们的外部参数,这里可以传入当前build的描述信息到蒲公英平台
    gym(
        clean:true, # 打包前clean项目
        scheme:"JS_Shipper", # scheme
        export_method:"development", # 导出方式
        configuration:"Debug", # 环境
        output_directory:"/Users/jason_hzb/Desktop/fastlane", # 打包后的ipa文件存放的目录
        output_name:"JS_Shipper" # ipa 文件名
       )
    #蒲公英的配置 替换为自己的api_key和user_key
    pgyer(api_key: "24ab778fdefd56713d8840d4fb7126af", user_key: "bee712f25eab64ded9cc4d14f0f5aa53",update_description: options[:desc])
    # add actions here: https://docs.fastlane.tools/actions
  end
end

五、参考

rvm安装、自动化打包fastlane安装

https://www.cnblogs.com/lulushen/p/8268330.html

fastlane安装

https://blog.csdn.net/liyunxiangrxm/article/details/66972753

iOS效率神器fastlane自动打包

https://www.jianshu.com/p/5d836e89d9d1

fastlane感悟

https://www.jianshu.com/p/b210b05330ea

Jenkins配置节点(解决Linux上iOS打包)

https://www.jianshu.com/p/f445983512b7

iOS开发-自动化打包Jenkins集成

https://www.jianshu.com/p/69b544d2a9d1

相关文章

网友评论

      本文标题:iOS开发:自动化编译(fastlane)

      本文链接:https://www.haomeiwen.com/subject/cmdbaqtx.html