Fastfile 1.43 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1
fastlane_version “2.37.0”
2 3
default_platform :ios

曹云霄's avatar
曹云霄 committed
4

5 6 7 8 9 10 11
platform :ios do
  before_all do
    cocoapods
    
  end


曹云霄's avatar
曹云霄 committed
12 13 14 15
  desc "打包企业版"
  puts "   \033[35mAre you ready?\033[0m\n"  
  lane :inHouse do |options|
  increment_version_number(version_number: options[:version]) #根据入参version获取app版本号
16 17
  gym(
    workspace: "Lighting.xcworkspace",
曹云霄's avatar
曹云霄 committed
18
    scheme: options[:target],
19
    clean: true,
曹云霄's avatar
曹云霄 committed
20
    output_directory: File.expand_path('..', __FILE__) + "/iPA", 
21
    export_method: "enterprise",
曹云霄's avatar
曹云霄 committed
22
    output_name: options[:target] + Time.new.strftime("%Y-%m-%d %H:%M:%S") + ".ipa"  
23
  )
曹云霄's avatar
曹云霄 committed
24 25 26
  
  if options[:pgy] == "dis"
    puts "   \033[31m打包正式版完成,正在上传正式环境蒲公英\033[0m\n"
27
    pgyer(api_key: "cae8404d79c5e29cb641f84c8b9a6d1e", user_key: "9d4d2d2af95f22d4b6ccbd67b2444e46")
28 29
  end

曹云霄's avatar
曹云霄 committed
30 31
  if options[:pgy] == "dev"
    puts "   \033[31m打包测试版完成,正在上传测试环境蒲公英\033[0m\n"
曹云霄's avatar
曹云霄 committed
32
    pgyer(api_key: "1c1acff227f9dea3eafd531ba369680d", user_key: "02794c3c6f78cbfda696f807d4cb1da0")
33 34
  end

曹云霄's avatar
曹云霄 committed
35 36 37 38
  if options[:pgy] == "test"
    puts "   \033[31m打包开发版完成,正在上传开发环境蒲公英\033[0m\n"
    pgyer(api_key: "f9aefb343ecc7959f8e216ed08db1c83", user_key: "a6283ec42bbaf9efc5b6f01a750299f3")
  end
39

曹云霄's avatar
曹云霄 committed
40 41
  puts "   \033[32mGood boy Have a nice day\033[0m\n"  
    
42 43
  end

曹云霄's avatar
曹云霄 committed
44 45 46 47 48





49 50 51 52 53 54 55 56
  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end