Class: PodPrebuild::CacheFetcher

Inherits:
CommandExecutor show all
Defined in:
lib/command/executor/fetcher.rb

Instance Method Summary collapse

Methods inherited from CommandExecutor

#installer, #prepare_cache_dir, #use_local_cache?

Constructor Details

#initialize(options) ⇒ CacheFetcher

Returns a new instance of CacheFetcher.



10
11
12
13
14
# File 'lib/command/executor/fetcher.rb', line 10

def initialize(options)
  super(options)
  @repo_update = options[:repo_update]
  @unpack_mutex = Mutex.new
end

Instance Method Details

#runObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/command/executor/fetcher.rb', line 16

def run
  Pod::UI.step("Fetching cache") do
    FileUtils.mkdir_p(@config.prebuild_sandbox_path)
    @binary_installer = Pod::PrebuildInstaller.new(
      sandbox: Pod::PrebuildSandbox.from_standard_sandbox(installer.sandbox),
      podfile: installer.podfile,
      lockfile: installer.lockfile,
      cache_validation: nil
    )
    @binary_installer.repo_update = @repo_update
    Pod::UI.title("Generate Manifest") do
      @binary_installer.clean_delta_file
      @binary_installer.install!
    end
    @resolved_targets = @binary_installer.pod_targets
    fetch_remote_cache(@config.cache_repo, @config.cache_path)
    unzip_cache
  end
end