Fastfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # This file contains the fastlane.tools configuration
  2. # You can find the documentation at https://docs.fastlane.tools
  3. #
  4. # For a list of all available actions, check out
  5. #
  6. # https://docs.fastlane.tools/actions
  7. #
  8. # For a list of all available plugins, check out
  9. #
  10. # https://docs.fastlane.tools/plugins/available-plugins
  11. #
  12. # Uncomment the line if you want fastlane to automatically update itself
  13. # update_fastlane
  14. default_platform(:ios)
  15. platform :ios do
  16. desc "酷乐秀自动化打包"
  17. lane :Colexiu do
  18. time = Time.new.strftime("%Y%m%d") #获取时间格式
  19. version = get_version_number #获取版本号
  20. ipaName = "酷乐秀#{version}_#{time}.ipa"
  21. scheme = "KulexiuForStudent" # 项目的 scheme,自己项目名
  22. # add actions here: https://docs.fastlane.tools/actions
  23. # 开始打包
  24. build_app(
  25. clean: true, # 每次打包之前clean一下
  26. workspace: "KulexiuForStudent.xcworkspace", # 指定工程文件
  27. export_method: 'development', # 打包导出方式,包含 app-store, validation, ad-hoc, package,enterprise, development, developer-id and mac-application
  28. export_xcargs: '-allowProvisioningUpdates', # 这个设置是为了设置 xcode 自动配置证书和配置文件,当然也可以手动配置,可以参考文档
  29. configuration: 'Debug', # 默认 Release,Release or Debug
  30. silent: true, # 隐藏构建app时输出的不必要的信息
  31. output_directory: '/Users/wangzhi/Desktop/Archive/Debug', # 打包出 ipa 文件的路径 output_name:"#{ipaName}", # 打包的名称,可任意取
  32. )
  33. #配置上传蒲公英账号 蒲公英的 api_key和 user_key
  34. pgyer(api_key:'b4f2e606f6a6ffd71f5368fc9af634ea', user_key: 'fca8034bee3a119cbbe9ccd81141b8e7')
  35. # mac上的通知弹窗,通知打包完毕
  36. notification(app_icon: './fastlane/icon.png', title: 'manager', subtitle: '打包成功,已导出安装包', message: '准备发布中……')
  37. # 通知上传成功
  38. notification(app_icon:"icon.png",title:"LoanManager",subtitle: "IPA上传成功", message: "自动打包完成!")
  39. end
  40. end