Fastfile 2.04 KB
Newer Older
Andreas Traczyk's avatar
Andreas Traczyk committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# If you want to automatically update fastlane if a new version is available:
# update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.68.0"

default_platform :ios

platform :ios do
  desc "Runs all the tests"
  lane :test do
    scan
  end

  desc "Test build without packaging"
  lane :build do
    unlock_keychain
    match(
      force: true,
      type: "development"
    )
    gym(
      scheme: "Ring",
      clean: true,
      configuration: "Development",
      export_method: 'development',
      skip_package_ipa: true
    )
  end

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
  desc "Submit a new Beta Build to Apple TestFlight"
  lane :beta do
    ensure_git_status_clean
    unlock_keychain
    match(
      type: "appstore"
    )
    increment_build_number
    gym(
      scheme: "Ring",
      clean: true,
      configuration: "Release",
      export_method: 'app-store',
    )
    pilot(
      skip_waiting_for_build_processing: true
    )
    new_build_number = Actions.lane_context[Actions::SharedValues::BUILD_NUMBER]
    current_version = get_version_number
    message = "project: bump to version #{current_version}.#{new_build_number} for release"
    clean_build_artifacts
    commit_version_bump(
      xcodeproj: "Ring.xcodeproj",
      message: message,
      force: true
    )
    push_to_git_remote(
      local_branch: "HEAD",
      remote_branch: refs/for/master/fastlane,
      force: false,
      tags: false
    )
  end

Andreas Traczyk's avatar
Andreas Traczyk committed
74 75 76 77 78 79 80 81
  after_all do |lane|
    # This block is called, only if the executed lane was successful
  end

  error do |lane, exception|
    # This block is called, only if the executed lane has failed
  end
end