12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- # 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
- #超时时间和重复次数
- ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "600"
- ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "3"
- default_platform(:ios)
- platform :ios do
- # before_all do
- # ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = "applepsd4other"
- # # ENV["FASTLANE_SESSION"] = '生成的session cookie'
- # end
- desc "测试环境入口"
- lane :dev_build do
- # add actions here: https://docs.fastlane.tools/actions
- # # build 号加1
- # increment_build_number_in_plist(
- # target: "xxx"
- # )
- # git_commit(path:".", message:"Bump build to #{build_number}")
- # 清理构建目录
- # clean_build_artifacts
-
- # 安装依赖
- # cocoapods
- #获取时间格式
- time = Time.new.strftime("%Y%m%d%H%M")
- version = get_version_number#获取版本号
- ipaName = "huiguanjia_dev_#{version}_#{time}.ipa"
- # 构建应用
- gym(
- scheme:"dev", #项目名称
- export_method:"development",#打包的类型
- configuration:"Release",#模式,默认Release,还有Debug
- # clean: true,
- # clean: clean_build,
- output_name:"#{ipaName}",#输出的包名
- output_directory:"./fastlane_build"#输出的位置
- )
- # 上传版本到蒲公英平台
- pgyer(
- api_key: "237ccf1bb80c529471c732ea01035876",
- # user_key: "31c85d64720d80fc91b3b551d5b3d1e0",
- )
- end
- desc "生产环境入口"
- lane :release_build do
- # 清理构建目录
- clean_build_artifacts
- # 安装依赖
- cocoapods
- #获取时间格式
- time = Time.new.strftime("%Y%m%d%H%M")
- version = get_version_number#获取版本号
- ipaName = "huiguanjia_build_#{version}_#{time}.ipa"
- # 构建应用
- gym(
- scheme:"prod", #项目名称
- export_method:"app-store",#打包的类型
- configuration:"Release",#模式,默认Release,还有Debug
- output_name:"#{ipaName}",#输出的包名
- output_directory:"./fastlane_build"#输出的位置
- )
- # 上传到TestFlight
- upload_to_testflight
- end
- end
|