Sha256: 83e1aad9ea70d8f1f6e4770b01a74720355ed3d54c2d29cb709a242cd3488623

Contents?: true

Size: 1.73 KB

Versions: 119

Compression:

Stored size: 1.73 KB

Contents

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

HighLine.track_eof = false

module Supply
  class CommandsGenerator
    include Commander::Methods

    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'

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

        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'

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

        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

119 entries across 119 versions & 1 rubygems

Version Path
fastlane-2.21.0.beta.20170319010027 supply/lib/supply/commands_generator.rb
fastlane-2.21.0.beta.20170318010107 supply/lib/supply/commands_generator.rb
fastlane-2.21.0.beta.20170317010039 supply/lib/supply/commands_generator.rb
fastlane-2.21.0.beta.20170316010039 supply/lib/supply/commands_generator.rb
fastlane-2.20.0 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170315010053 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170314010029 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170313010048 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170312010035 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170311010030 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170310010058 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170309010049 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170308010036 supply/lib/supply/commands_generator.rb
fastlane-2.19.3 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170307010029 supply/lib/supply/commands_generator.rb
fastlane-2.19.2 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170306010752 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170305010057 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170304010023 supply/lib/supply/commands_generator.rb
fastlane-2.20.0.beta.20170303010054 supply/lib/supply/commands_generator.rb