Sha256: aa10850a35baea078991e6879b82fafab8ee0f96464cbc9f66bd7e15e34e3f7d

Contents?: true

Size: 1.71 KB

Versions: 9

Compression:

Stored size: 1.71 KB

Contents

#!/usr/bin/env ruby

$LOAD_PATH.push File.expand_path('../../lib', __FILE__)

require 'fastlane'
require 'commander'
require 'dotenv'
require 'fastlane/new_action'

HighLine.track_eof = false

class FastlaneApplication
  include Commander::Methods

  def run
    program :version, Fastlane::VERSION
    program :description, 'CLI for \'fastlane\' - Connect all iOS deployment tools into one streamlined workflow'
    program :help, 'Author', 'Felix Krause <fastlane@krausefx.com>'
    program :help, 'Website', 'https://fastlane.tools'
    program :help, 'GitHub', 'https://github.com/krausefx/fastlane'
    program :help_formatter, :compact

    always_trace!

    command :run do |c|
      c.syntax = 'fastlane run [lane]'
      c.description = 'Drive the fastlane for a specific environment.'
      c.option '--env STRING', String, 'Add environment to use with `dotenv`'

      c.action do |args, _options|
        if Fastlane::FastlaneFolder.path
          Fastlane::LaneManager.cruise_lanes(args, _options.env)
        else
          create = agree('Could not find fastlane in current directory. Would you like to set it up? (y/n)'.yellow, true)
          Fastlane::Setup.new.run if create
        end
      end
    end

    command :init do |c|
      c.syntax = 'fastlane init'
      c.description = 'Helps you setting up fastlane based on your existing tools.'

      c.action do |_args, _options|
        Fastlane::Setup.new.run
      end
    end

    command :new_action do |c|
      c.syntax = 'fastlane new_action'
      c.description = 'Create a new custom action for fastlane.'

      c.action do |_args, _options|
        Fastlane::NewAction.run
      end
    end

    default_command :run

    run!
  end
end

FastlaneApplication.new.run

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fastlane-0.6.0 bin/fastlane
fastlane-0.5.0 bin/fastlane
fastlane-0.4.2 bin/fastlane
fastlane-0.4.1 bin/fastlane
fastlane-0.4.0 bin/fastlane
fastlane-0.3.0 bin/fastlane
fastlane-0.2.1 bin/fastlane
fastlane-0.2.0 bin/fastlane
fastlane-0.1.19 bin/fastlane