File tree 2 files changed +16
-1
lines changed
lib/cocoapods-binary-cache/pod-binary/integration
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ module Pod
2
2
class Installer
3
3
def alter_specs_for_prebuilt_pods
4
4
cache = [ ]
5
+
6
+ @original_specs = analysis_result . specifications
7
+ . map { |spec | [ spec . name , Pod ::Specification . from_file ( spec . defined_in_file ) ] }
8
+ . to_h
9
+
5
10
analysis_result . specifications
6
11
. select { |spec | should_integrate_prebuilt_pod? ( spec . root . name ) }
7
12
. group_by ( &:root )
Original file line number Diff line number Diff line change @@ -18,8 +18,18 @@ def create_normal_source_installer(name)
18
18
original_create_pod_installer ( name )
19
19
end
20
20
21
+ def original_specs_by_platform ( name )
22
+ specs_for_pod ( name ) . map do |platform , specs |
23
+ specs_ = specs . map { |spec | @original_specs [ spec . name ] }
24
+ [ platform , specs_ ]
25
+ end . to_h
26
+ end
27
+
21
28
def create_prebuilt_source_installer ( name )
22
- source_installer = PodSourceInstaller . new ( sandbox , podfile , specs_for_pod ( name ) )
29
+ # A source installer needs to install with the original spec (instead of the altered spec).
30
+ # Otherwise, the cache will be corrupted because CocoaPods packs necessary dirs/files from temp dir
31
+ # to the cache dir based on the spec.
32
+ source_installer = PodSourceInstaller . new ( sandbox , podfile , original_specs_by_platform ( name ) )
23
33
pod_installer = PrebuiltSourceInstaller . new (
24
34
sandbox ,
25
35
podfile ,
You can’t perform that action at this time.
0 commit comments