Sha256: 3cb09447d52bb41b57c6c04ef805e645cf304be45e11e2a447bbe397f93f0f56

Contents?: true

Size: 972 Bytes

Versions: 3

Compression:

Stored size: 972 Bytes

Contents

module Pod
  class Installer
    # Remove the old target files if prebuild frameworks changed
    def remove_target_files_if_needed
      changes = Pod::Prebuild::Passer.prebuild_pods_changes
      updated_names = []
      if changes.nil?
        updated_names = PrebuildSandbox.from_standard_sandbox(sandbox).exsited_framework_pod_names
      else
        added = changes.added
        changed = changes.changed
        deleted = changes.deleted
        updated_names = added + changed + deleted
      end

      updated_names.each do |name|
        root_name = Specification.root_name(name)
        next if !Pod::Podfile::DSL.dev_pods_enabled && sandbox.local?(root_name)

        UI.puts "Delete cached files: #{root_name}"
        target_path = sandbox.pod_dir(root_name)
        target_path.rmtree if target_path.exist?

        support_path = sandbox.target_support_files_dir(root_name)
        support_path.rmtree if support_path.exist?
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.3 lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb
cocoapods-binary-cache-0.1.2 lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb
cocoapods-binary-cache-0.1.1 lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb