fastlane_version "2.46.0"
default_platform :ios


default_platform(:ios)

platform :ios do
  desc "打包统一版本"
  lane :pkg do |options|
    gym(
        scheme:"zhihuihuanglong",
        export_method:"enterprise",
        output_directory:"/Users/Javen/Desktop/fastlane",
        output_name:"zhihuihuanglong.ipa",
        export_xcargs: "-allowProvisioningUpdates",
    )

    if options[:to] == "alpha"
        puts "   \033[31m打包完成，正在上传测试蒲公英\033[0m\n"
        pgyer(api_key: "1c1acff227f9dea3eafd531ba369680d", user_key: "02794c3c6f78cbfda696f807d4cb1da0")
    end
    
    # if options[:to] == "release"
    #     puts "   \033[31m打包完成，正在上传正式蒲公英\033[0m\n"
    #     pgyer(api_key: "e76d1eeacca62bc9310120f34febcbc8", user_key: "7177be6d7a474d4444675e716f64e66d")
    # end

    
    # pgyer(api_key: "1c1acff227f9dea3eafd531ba369680d", user_key: "02794c3c6f78cbfda696f807d4cb1da0")
  end
end

