25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/cocoapods-binary-matchup/Integration.rb', line 25
def install_for_prebuild!(standard_sanbox)
return if standard_sanbox.local? self.name
UI.puts "install_for_prebuild! start: #{self.name}"
prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sanbox)
target_folder = standard_sanbox.pod_dir(self.name)
target_folder.rmtree if target_folder.exist?
real_file_folder = prebuild_sandbox.framework_folder_path_for_pod_name(self.name)
if real_file_folder.exist?
FileUtils.cp_r(real_file_folder, target_folder, :remove_destination => true)
UI.puts "📦 Copied prebuilt files for #{self.name}: #{real_file_folder} -> #{target_folder}"
Pod::PrebuildCache::Cache.save_to_cache(self.name, target_folder.to_s)
else
UI.puts "⚠️ Warning: Prebuilt files not found for #{self.name} at #{real_file_folder}"
target_folder.mkpath
end
end
|