Sha256: ddfec30355d2ff1c23e96f4f213d92cb195eb4515e778d1502e92db735fa675b

Contents?: true

Size: 1.9 KB

Versions: 73

Compression:

Stored size: 1.9 KB

Contents

require "commander"
require "fastlane_core"
require 'fastlane_core/ui/help_formatter'
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, FastlaneCore::HelpFormatter

      always_trace!

      global_option('--verbose') { FastlaneCore::Globals.verbose = true }
      global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')

      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

73 entries across 73 versions & 4 rubygems

Version Path
fastlane-2.226.0 supply/lib/supply/commands_generator.rb
fastlane-2.225.0 supply/lib/supply/commands_generator.rb
fastlane-2.224.0 supply/lib/supply/commands_generator.rb
fastlane-2.223.1 supply/lib/supply/commands_generator.rb
fastlane-2.223.0 supply/lib/supply/commands_generator.rb
fastlane-2.222.0 supply/lib/supply/commands_generator.rb
fastlane-2.221.1 supply/lib/supply/commands_generator.rb
fastlane-2.221.0 supply/lib/supply/commands_generator.rb
fastlane-2.220.0 supply/lib/supply/commands_generator.rb
fastlane-2.219.0 supply/lib/supply/commands_generator.rb
fastlane-2.218.0 supply/lib/supply/commands_generator.rb
fastlane-security-patched-2.216.0 supply/lib/supply/commands_generator.rb
fastlane-2.217.0 supply/lib/supply/commands_generator.rb
fastlane-2.216.0 supply/lib/supply/commands_generator.rb
fastlane-2.215.1 supply/lib/supply/commands_generator.rb
fastlane-2.215.0 supply/lib/supply/commands_generator.rb
fastlane-mercafacil-2.214.0 supply/lib/supply/commands_generator.rb
fastlane-2.214.0 supply/lib/supply/commands_generator.rb
fastlane-2.213.0 supply/lib/supply/commands_generator.rb
fastlane-2.212.2 supply/lib/supply/commands_generator.rb