Fastfile 1.33 KB
Newer Older
jzhang's avatar
jzhang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# 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

default_platform(:ios)
platform :ios do
  lane :ad do |options|
    desc = options[:desc]
    scheme = "BreastFeedingDemo"
jzhang's avatar
jzhang committed
21
    currentTime = Time.new.strftime("%Y-%m-%d %H-%M")
jzhang's avatar
jzhang committed
22
    output_path = "/Users/jzhang/Desktop/BF_AiDemo"
jzhang's avatar
jzhang committed
23
    ipa_name = "BF_AiDemo_#{currentTime}"
jzhang's avatar
jzhang committed
24 25 26

    increment_build_number

jzhang's avatar
jzhang committed
27 28 29 30 31
    # 2. git add .
    git_add(path: ".")
    # git commit -m 'xxx'
    git_commit(path: ".", message: "发布版本")

jzhang's avatar
jzhang committed
32
    gym(
jzhang's avatar
jzhang committed
33 34
      # 如果是用workspace,就启用下面一行
      # workspace: "BreastFeedingDemo.xcworkspace",
jzhang's avatar
jzhang committed
35 36 37 38 39
      scheme: "#{scheme}",
      output_name: "#{ipa_name}",
      clean: true,
      configuration: "Release",
      export_method: "ad-hoc",
jzhang's avatar
jzhang committed
40
      xcargs: "-allowProvisioningUpdates",
jzhang's avatar
jzhang committed
41 42 43
      output_directory: "#{output_path}",
    )

jzhang's avatar
jzhang committed
44 45 46 47 48
    pgyer(
      api_key: "1c1acff227f9dea3eafd531ba369680d",
      user_key: "02794c3c6f78cbfda696f807d4cb1da0",
      update_description: "#{desc}",
    )
jzhang's avatar
jzhang committed
49 50
  end
end