Sha256: 452bf7651c2a6039cfd3c95f0c5d9fe558e92c388a185dae5c83f329a7abd2c1

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require_relative "executor/fetcher"
require 'io/console'

module Pod
  class Command
    class Binary < Command
      class Fetch < Binary
        self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
        def initialize(argv)
          super
          unless ENV['ARTIFACTORY_LOGIN'].nil? && ENV['ARTIFACTORY_PASSWORD'].nil?
            update_cli_config(
              :artifactory_login => ENV['ARTIFACTORY_LOGIN'],
              :artifactory_password => ENV['ARTIFACTORY_PASSWORD']
            )
          else
            Pod::UI.puts "Enter Artifactory login:"
            login = IO::console.gets.strip
            Pod::UI.puts "Enter Artifactory password:"
            password = IO::console.getpass
            update_cli_config(
              :artifactory_login => login,
              :artifactory_password => password
            )
          end
          update_cli_config(
            :fetch_job => true
          )
          @fetcher = PodPrebuild::CacheFetcher.new(
            config: prebuild_config,
          )
        end

        def run
          @fetcher.run
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-binary-artifactory-cache-0.0.2 lib/command/fetch.rb