Sha256: 7d4a58c73e754e2bc924eb813d9fd2c6ff0d16456085dffd83431cba134040ff

Contents?: true

Size: 1.75 KB

Versions: 526

Compression:

Stored size: 1.75 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, 'Documentation', 'https://docs.fastlane.tools/actions/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, command: c)

        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, command: c)

        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

526 entries across 526 versions & 2 rubygems

Version Path
fastlane-2.132.0.beta.20190929200020 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190928200106 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190927200017 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190926200023 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190925200108 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190924200030 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190923200017 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190922200014 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190921200021 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190920200012 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190919200100 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190918200023 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190917200011 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190916200055 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190915200038 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190914200034 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190913200058 supply/lib/supply/commands_generator.rb
fastlane-2.132.0.beta.20190912200052 supply/lib/supply/commands_generator.rb
fastlane-2.131.0 supply/lib/supply/commands_generator.rb
fastlane-2.131.0.beta.20190911200010 supply/lib/supply/commands_generator.rb