Sha256: de1d3f29c14b3560a5add991b9447b6ba2a3cea29d7effece56276bfbe440ba7

Contents?: true

Size: 1.63 KB

Versions: 9

Compression:

Stored size: 1.63 KB

Contents

require "commander"
require "fastlane_core"
require "supply"

HighLine.track_eof = false

module Supply
  class CommandsGenerator
    include Commander::Methods

    FastlaneCore::CommanderGenerator.new.generate(Supply::Options.available_options)

    def self.start
      new.run
    end

    def run
      program :name, 'supply'
      program :version, Fastlane::VERSION
      program :description, Supply::DESCRIPTION
      program :help, 'Author', 'Felix Krause <supply@krausefx.com>'
      program :help, 'Website', 'https://fastlane.tools'
      program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/supply'
      program :help_formatter, :compact

      always_trace!

      global_option('--verbose') { FastlaneCore::Globals.verbose = true }

      command :run do |c|
        c.syntax = 'fastlane supply'
        c.description = 'Run a deploy process'
        c.action do |args, options|
          Supply.config = FastlaneCore::Configuration.create(Supply::Options.available_options, options.__hash__)
          load_supplyfile

          Supply::Uploader.new.perform_upload
        end
      end

      command :init do |c|
        c.syntax = 'fastlane supply init'
        c.description = 'Sets up supply for you'
        c.action do |args, options|
          require 'supply/setup'
          Supply.config = FastlaneCore::Configuration.create(Supply::Options.available_options, options.__hash__)
          load_supplyfile

          Supply::Setup.new.perform_download
        end
      end

      default_command :run

      run!
    end

    def load_supplyfile
      Supply.config.load_configuration_file('Supplyfile')
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fastlane-2.18.0.beta.20170217010035 supply/lib/supply/commands_generator.rb
fastlane-2.18.0.beta.20170216184940 supply/lib/supply/commands_generator.rb
fastlane-2.17.1 supply/lib/supply/commands_generator.rb
fastlane-2.17.0 supply/lib/supply/commands_generator.rb
fastlane-2.16.0 supply/lib/supply/commands_generator.rb
fastlane-2.15.1 supply/lib/supply/commands_generator.rb
fastlane-2.16.0.beta.20170214010051 supply/lib/supply/commands_generator.rb
fastlane-2.15.0 supply/lib/supply/commands_generator.rb
fastlane-2.15.0.beta.20170213032052 supply/lib/supply/commands_generator.rb