cocoapods-binary-cache 0.1.1 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cocoapods-binary-cache.rb +0 -2
- data/lib/cocoapods-binary-cache/cache/validator.rb +2 -3
- data/lib/cocoapods-binary-cache/cache/validator_base.rb +28 -8
- data/lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb +7 -2
- data/lib/cocoapods-binary-cache/cache/validator_dev_pods.rb +21 -13
- data/lib/cocoapods-binary-cache/cache/validator_non_dev_pods.rb +1 -1
- data/lib/cocoapods-binary-cache/diagnosis/base.rb +13 -0
- data/lib/cocoapods-binary-cache/diagnosis/diagnosis.rb +16 -0
- data/lib/cocoapods-binary-cache/diagnosis/integration.rb +21 -0
- data/lib/cocoapods-binary-cache/env.rb +32 -0
- data/lib/cocoapods-binary-cache/helper/checksum.rb +10 -4
- data/lib/cocoapods-binary-cache/helper/lockfile.rb +26 -3
- data/lib/cocoapods-binary-cache/helper/podspec.rb +1 -0
- data/lib/cocoapods-binary-cache/hooks/post_install.rb +19 -2
- data/lib/cocoapods-binary-cache/hooks/pre_install.rb +11 -14
- data/lib/cocoapods-binary-cache/main.rb +2 -1
- data/lib/cocoapods-binary-cache/pod-binary/helper/build.rb +39 -0
- data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb +1 -1
- data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb +3 -10
- data/lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb +0 -38
- data/lib/cocoapods-binary-cache/pod-binary/helper/names.rb +2 -11
- data/lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb +1 -2
- data/lib/cocoapods-binary-cache/pod-binary/integration.rb +0 -1
- data/lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb +4 -1
- data/lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb +5 -2
- data/lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb +2 -2
- data/lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb +42 -50
- data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +59 -47
- data/lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb +2 -59
- data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb +176 -0
- data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb +43 -0
- data/lib/cocoapods-binary-cache/prebuild_output/metadata.rb +16 -0
- data/lib/cocoapods-binary-cache/prebuild_output/output.rb +8 -37
- data/lib/cocoapods-binary-cache/scheme_editor.rb +1 -1
- data/lib/command/binary.rb +21 -2
- data/lib/command/config.rb +150 -9
- data/lib/command/executor/fetcher.rb +10 -5
- data/lib/command/executor/prebuilder.rb +2 -1
- data/lib/command/executor/pusher.rb +1 -1
- data/lib/command/fetch.rb +0 -1
- data/lib/command/helper/zip.rb +1 -1
- data/lib/command/prebuild.rb +14 -2
- data/lib/command/push.rb +22 -0
- metadata +19 -14
- data/lib/cocoapods-binary-cache/gem_version.rb +0 -6
- data/lib/cocoapods-binary-cache/pod-rome/build_framework.rb +0 -247
- data/lib/cocoapods-binary-cache/prebuild_cache.rb +0 -49
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e068bdcb9e91a8e599e3ad1732837a1a7dbd49a4409e05b97b1cdc476bfb76a7
|
|
4
|
+
data.tar.gz: 21d3e3fa0374a8818efa927bb822ce9386e43e18ec26a1ab5be7d8b481a688d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5588698b1d818071b2bfb568bcbd44bc1e02084f7caf0b4b554a50277f2064209ec527339de4c8166ab74ff358b0a173f149b5db67f33a808c8d562f8d02625
|
|
7
|
+
data.tar.gz: dd21d19ff94f2a8dcf3b4b1dd7372484993e0aba4705512fde75be14e66d72ddadc592fc88b9ea81ae3983f156e5fe251e4dbcfe8047f7904db1b0fd3cf0cbcf
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
module PodPrebuild
|
|
2
|
-
class CacheValidator
|
|
2
|
+
class CacheValidator
|
|
3
3
|
def initialize(options)
|
|
4
|
-
super(options)
|
|
5
4
|
@validators = [
|
|
6
5
|
PodPrebuild::PodfileChangesCacheValidator.new(options),
|
|
7
6
|
PodPrebuild::NonDevPodsCacheValidator.new(options)
|
|
8
7
|
]
|
|
9
|
-
@validators << PodPrebuild::DevPodsCacheValidator.new(options) if
|
|
8
|
+
@validators << PodPrebuild::DevPodsCacheValidator.new(options) if PodPrebuild.config.dev_pods_enabled?
|
|
10
9
|
@validators << PodPrebuild::DependenciesGraphCacheValidator.new(options)
|
|
11
10
|
@validators << PodPrebuild::ExclusionCacheValidator.new(options)
|
|
12
11
|
end
|
|
@@ -37,6 +37,7 @@ module PodPrebuild
|
|
|
37
37
|
hit = Set.new
|
|
38
38
|
|
|
39
39
|
check_pod = lambda do |name|
|
|
40
|
+
root_name = name.split("/")[0]
|
|
40
41
|
version = pods[name]
|
|
41
42
|
prebuilt_version = prebuilt_pods[name]
|
|
42
43
|
result = false
|
|
@@ -44,13 +45,15 @@ module PodPrebuild
|
|
|
44
45
|
missed[name] = "Not available (#{version})"
|
|
45
46
|
elsif prebuilt_version != version
|
|
46
47
|
missed[name] = "Outdated: (prebuilt: #{prebuilt_version}) vs (#{version})"
|
|
48
|
+
elsif load_metadata(root_name).blank?
|
|
49
|
+
missed[name] = "Metadata not available (probably #{root_name}.zip is not in GeneratedFrameworks)"
|
|
47
50
|
else
|
|
48
|
-
|
|
49
|
-
if
|
|
51
|
+
diff = incompatible_pod(root_name)
|
|
52
|
+
if diff.empty?
|
|
50
53
|
hit << name
|
|
51
54
|
result = true
|
|
52
55
|
else
|
|
53
|
-
missed[name] = "Incompatible
|
|
56
|
+
missed[name] = "Incompatible: #{diff}"
|
|
54
57
|
end
|
|
55
58
|
end
|
|
56
59
|
result
|
|
@@ -70,11 +73,10 @@ module PodPrebuild
|
|
|
70
73
|
PodPrebuild::CacheValidationResult.new(missed, hit)
|
|
71
74
|
end
|
|
72
75
|
|
|
73
|
-
def
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
metadata.build_settings
|
|
76
|
+
def incompatible_pod(name)
|
|
77
|
+
# Pod incompatibility is a universal concept. Generally, it requires build settings compatibility.
|
|
78
|
+
# For more checks, do override this function to define what it means by `incompatible`.
|
|
79
|
+
incompatible_build_settings(name)
|
|
78
80
|
end
|
|
79
81
|
|
|
80
82
|
def incompatible_build_settings(name)
|
|
@@ -88,5 +90,23 @@ module PodPrebuild
|
|
|
88
90
|
end
|
|
89
91
|
settings_diff
|
|
90
92
|
end
|
|
93
|
+
|
|
94
|
+
def load_metadata(name)
|
|
95
|
+
@metadata_cache ||= {}
|
|
96
|
+
cache = @metadata_cache[name]
|
|
97
|
+
return cache unless cache.nil?
|
|
98
|
+
|
|
99
|
+
metadata = PodPrebuild::Metadata.in_dir(generated_framework_path + name)
|
|
100
|
+
@metadata_cache[name] = metadata
|
|
101
|
+
metadata
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def read_prebuilt_build_settings(name)
|
|
105
|
+
load_metadata(name).build_settings
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def read_source_hash(name)
|
|
109
|
+
load_metadata(name).source_hash
|
|
110
|
+
end
|
|
91
111
|
end
|
|
92
112
|
end
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
module PodPrebuild
|
|
2
2
|
class DependenciesGraphCacheValidator < AccumulatedCacheValidator
|
|
3
|
+
def initialize(options)
|
|
4
|
+
super(options)
|
|
5
|
+
@ignored_pods = options[:ignored_pods] || Set.new
|
|
6
|
+
end
|
|
7
|
+
|
|
3
8
|
def validate(accumulated)
|
|
4
9
|
return accumulated if library_evolution_supported? || @pod_lockfile.nil?
|
|
5
10
|
|
|
6
11
|
dependencies_graph = DependenciesGraph.new(@pod_lockfile.lockfile)
|
|
7
|
-
clients = dependencies_graph.get_clients(accumulated.missed.to_a)
|
|
8
|
-
unless
|
|
12
|
+
clients = dependencies_graph.get_clients(accumulated.discard(@ignored_pods).missed.to_a)
|
|
13
|
+
unless PodPrebuild.config.dev_pods_enabled?
|
|
9
14
|
clients = clients.reject { |client| @pod_lockfile.dev_pods.keys.include?(client) }
|
|
10
15
|
end
|
|
11
16
|
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
module PodPrebuild
|
|
2
2
|
class DevPodsCacheValidator < BaseCacheValidator
|
|
3
|
-
def initialize(options)
|
|
4
|
-
super(options)
|
|
5
|
-
@sandbox_root = options[:sandbox_root]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
3
|
def validate(*)
|
|
9
4
|
return PodPrebuild::CacheValidationResult.new if @pod_lockfile.nil?
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@
|
|
15
|
-
@generated_framework_path,
|
|
16
|
-
@pod_lockfile.lockfile
|
|
6
|
+
validate_pods(
|
|
7
|
+
pods: @pod_lockfile.dev_pods,
|
|
8
|
+
subspec_pods: [],
|
|
9
|
+
prebuilt_pods: @prebuilt_lockfile.nil? ? {} : @prebuilt_lockfile.dev_pods
|
|
17
10
|
)
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def incompatible_pod(name)
|
|
14
|
+
diff = super(name)
|
|
15
|
+
return diff unless diff.empty?
|
|
16
|
+
|
|
17
|
+
incompatible_source(name)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def incompatible_source(name)
|
|
21
|
+
diff = {}
|
|
22
|
+
prebuilt_hash = read_source_hash(name)
|
|
23
|
+
expected_hash = pod_lockfile.dev_pod_hash(name)
|
|
24
|
+
unless prebuilt_hash == expected_hash
|
|
25
|
+
diff[name] = { :prebuilt_hash => prebuilt_hash, :expected_hash => expected_hash}
|
|
26
|
+
end
|
|
27
|
+
diff
|
|
20
28
|
end
|
|
21
29
|
end
|
|
22
30
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module PodPrebuild
|
|
2
|
+
class BaseDiagnosis
|
|
3
|
+
def initialize(options)
|
|
4
|
+
@cache_validation = options[:cache_validation]
|
|
5
|
+
@standard_sandbox = options[:standard_sandbox]
|
|
6
|
+
@specs = (options[:specs] || []).map { |s| [s.name, s] }.to_h
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def spec(name)
|
|
10
|
+
@specs[name]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require_relative "base"
|
|
2
|
+
require_relative "integration"
|
|
3
|
+
|
|
4
|
+
module PodPrebuild
|
|
5
|
+
class Diagnosis
|
|
6
|
+
def initialize(options)
|
|
7
|
+
@diagnosers = [
|
|
8
|
+
IntegrationDiagnosis
|
|
9
|
+
].map { |klazz| klazz.new(options) }
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def run
|
|
13
|
+
@diagnosers.each(&:run)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require_relative "base"
|
|
2
|
+
|
|
3
|
+
module PodPrebuild
|
|
4
|
+
class IntegrationDiagnosis < BaseDiagnosis
|
|
5
|
+
def run
|
|
6
|
+
should_be_integrated = if PodPrebuild.config.prebuild_job? \
|
|
7
|
+
then @cache_validation.hit + @cache_validation.missed \
|
|
8
|
+
else @cache_validation.hit \
|
|
9
|
+
end
|
|
10
|
+
should_be_integrated = should_be_integrated.map { |name| name.split("/")[0] }.to_set
|
|
11
|
+
unintegrated = should_be_integrated.reject do |name|
|
|
12
|
+
module_name = spec(name)&.module_name || name
|
|
13
|
+
framework_path = \
|
|
14
|
+
@standard_sandbox.pod_dir(name) + \
|
|
15
|
+
PodPrebuild.config.prebuilt_path(path: "#{module_name}.framework")
|
|
16
|
+
framework_path.exist?
|
|
17
|
+
end
|
|
18
|
+
Pod::UI.puts "🚩 Unintegrated frameworks: #{unintegrated}".yellow unless unintegrated.empty?
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module PodPrebuild
|
|
2
|
+
class Env
|
|
3
|
+
@stage_idx = 0
|
|
4
|
+
|
|
5
|
+
class << self
|
|
6
|
+
def reset!
|
|
7
|
+
@stage_idx = 0
|
|
8
|
+
@stages = nil
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def next_stage!
|
|
12
|
+
@stage_idx += 1 if @stage_idx < stages.count - 1
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def stages
|
|
16
|
+
@stages ||= PodPrebuild.config.prebuild_job? ? [:prebuild, :integration] : [:integration]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def current_stage
|
|
20
|
+
stages[@stage_idx]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def prebuild_stage?
|
|
24
|
+
current_stage == :prebuild
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def integration_stage?
|
|
28
|
+
current_stage == :integration
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
require "digest/md5"
|
|
5
5
|
|
|
6
6
|
class FolderChecksum
|
|
7
|
-
def self.
|
|
8
|
-
files
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
def self.git_checksum(dir)
|
|
8
|
+
checksum_of_files(`git ls-files #{dir}`.split("\n"))
|
|
9
|
+
rescue => e
|
|
10
|
+
Pod::UI.warn "Cannot get checksum of tracked files under #{dir}: #{e}"
|
|
11
|
+
checksum_of_files(Dir["#{dir}/**/*"].reject { |f| File.directory?(f) })
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.checksum_of_files(files)
|
|
15
|
+
checksums = files.sort.map { |f| Digest::MD5.hexdigest(File.read(f)) }
|
|
16
|
+
Digest::MD5.hexdigest(checksums.join)
|
|
11
17
|
end
|
|
12
18
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require_relative "checksum"
|
|
2
|
+
|
|
1
3
|
module PodPrebuild
|
|
2
4
|
class Lockfile
|
|
3
5
|
attr_reader :lockfile, :data
|
|
@@ -15,6 +17,10 @@ module PodPrebuild
|
|
|
15
17
|
@data["EXTERNAL SOURCES"] || {}
|
|
16
18
|
end
|
|
17
19
|
|
|
20
|
+
def dev_pod_sources
|
|
21
|
+
@dev_pod_sources ||= external_sources.select { |_, attributes| attributes.key?(:path) } || {}
|
|
22
|
+
end
|
|
23
|
+
|
|
18
24
|
def dev_pod_names
|
|
19
25
|
# There are 2 types of external sources:
|
|
20
26
|
# - Development pods: declared with `:path` option in Podfile, corresponding to `:path` in the Lockfile
|
|
@@ -27,7 +33,7 @@ module PodPrebuild
|
|
|
27
33
|
# :git: git@remote_url
|
|
28
34
|
# :commit: abc1234
|
|
29
35
|
# --------------------
|
|
30
|
-
@dev_pod_names ||=
|
|
36
|
+
@dev_pod_names ||= dev_pod_sources.keys.to_set
|
|
31
37
|
end
|
|
32
38
|
|
|
33
39
|
def dev_pods
|
|
@@ -40,13 +46,30 @@ module PodPrebuild
|
|
|
40
46
|
@non_dev_pods ||= pods.reject { |name, _| dev_pod_names_.include?(name) }
|
|
41
47
|
end
|
|
42
48
|
|
|
49
|
+
def subspec_vendor_pods
|
|
50
|
+
dev_pod_names_ = dev_pod_names
|
|
51
|
+
@subspec_vendor_pods ||= subspec_pods.reject { |name, _| dev_pod_names_.include?(name) }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Return content hash (Hash the directory at source path) of a dev_pod
|
|
55
|
+
# Return nil if it's not a dev_pod
|
|
56
|
+
def dev_pod_hash(pod_name)
|
|
57
|
+
dev_pod_hashes_map[pod_name]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
43
62
|
def subspec_pods
|
|
44
|
-
pods.keys
|
|
63
|
+
@subspec_pods ||= pods.keys
|
|
45
64
|
.select { |k| k.include?("/") }
|
|
46
65
|
.group_by { |k| k.split("/")[0] }
|
|
47
66
|
end
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
# Generate a map between a dev_pod and it source hash
|
|
69
|
+
def dev_pod_hashes_map
|
|
70
|
+
@dev_pod_hashes_map ||=
|
|
71
|
+
dev_pod_sources.map { |name, attribs| [name, FolderChecksum.git_checksum(attribs[:path])] }.to_h
|
|
72
|
+
end
|
|
50
73
|
|
|
51
74
|
# Parse an item under `PODS` section of a Lockfile
|
|
52
75
|
# @param hash_or_string: an item under `PODS` section, could be a Hash (if having dependencies) or a String
|
|
@@ -5,12 +5,29 @@ module PodPrebuild
|
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def run
|
|
8
|
-
|
|
8
|
+
edit_scheme_for_code_coverage if PodPrebuild::Env.prebuild_stage?
|
|
9
|
+
diagnose if PodPrebuild::Env.integration_stage?
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def diagnose
|
|
15
|
+
Pod::UI.section("Diagnosing cocoapods-binary-cache") do
|
|
16
|
+
PodPrebuild::Diagnosis.new(
|
|
17
|
+
cache_validation: PodPrebuild::StateStore.cache_validation,
|
|
18
|
+
standard_sandbox: @installer_context.sandbox,
|
|
19
|
+
specs: @installer_context.umbrella_targets.map(&:specs).flatten
|
|
20
|
+
).run
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def edit_scheme_for_code_coverage
|
|
25
|
+
return unless PodPrebuild.config.dev_pods_enabled? && @installer_context.sandbox.instance_of?(Pod::PrebuildSandbox)
|
|
9
26
|
|
|
10
27
|
# Modify pods scheme to support code coverage
|
|
11
28
|
# If we don't prebuild dev pod -> no need to care about this in Pod project
|
|
12
29
|
# because we setup in the main project (ex. DriverCI scheme)
|
|
13
|
-
SchemeEditor.edit_to_support_code_coverage(@installer_context.sandbox)
|
|
30
|
+
SchemeEditor.edit_to_support_code_coverage(@installer_context.sandbox)
|
|
14
31
|
end
|
|
15
32
|
end
|
|
16
33
|
end
|
|
@@ -13,18 +13,21 @@ module PodPrebuild
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def run
|
|
16
|
+
return if @installer_context.sandbox.is_a?(Pod::PrebuildSandbox)
|
|
17
|
+
|
|
16
18
|
require_relative "../pod-binary/helper/feature_switches"
|
|
17
|
-
return if Pod.is_prebuild_stage
|
|
18
19
|
|
|
19
20
|
log_section "🚀 Prebuild frameworks"
|
|
20
21
|
ensure_valid_podfile
|
|
21
22
|
save_installation_states
|
|
22
|
-
prepare_environment
|
|
23
|
+
Pod::UI.section("Prepare environment") { prepare_environment }
|
|
23
24
|
create_prebuild_sandbox
|
|
24
25
|
Pod::UI.section("Detect implicit dependencies") { detect_implicit_dependencies }
|
|
25
26
|
Pod::UI.section("Validate prebuilt cache") { validate_cache }
|
|
26
|
-
prebuild! if
|
|
27
|
-
reset_environment
|
|
27
|
+
prebuild! if PodPrebuild.config.prebuild_job?
|
|
28
|
+
Pod::UI.section("Reset environment") { reset_environment }
|
|
29
|
+
|
|
30
|
+
PodPrebuild::Env.next_stage!
|
|
28
31
|
log_section "🤖 Resume pod installation"
|
|
29
32
|
require_relative "../pod-binary/integration"
|
|
30
33
|
end
|
|
@@ -53,19 +56,13 @@ module PodPrebuild
|
|
|
53
56
|
end
|
|
54
57
|
|
|
55
58
|
def prepare_environment
|
|
56
|
-
Pod::UI.puts "Prepare environment"
|
|
57
|
-
Pod.is_prebuild_stage = true
|
|
58
|
-
Pod::Podfile::DSL.enable_prebuild_patch true # enable sikpping for prebuild targets
|
|
59
59
|
Pod::Installer.force_disable_integration true # don't integrate targets
|
|
60
60
|
Pod::Config.force_disable_write_lockfile true # disbale write lock file for perbuild podfile
|
|
61
61
|
Pod::Installer.disable_install_complete_message true # disable install complete message
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def reset_environment
|
|
65
|
-
Pod::UI.puts "Reset environment"
|
|
66
|
-
Pod.is_prebuild_stage = false
|
|
67
65
|
Pod::Installer.force_disable_integration false
|
|
68
|
-
Pod::Podfile::DSL.enable_prebuild_patch false
|
|
69
66
|
Pod::Config.force_disable_write_lockfile false
|
|
70
67
|
Pod::Installer.disable_install_complete_message false
|
|
71
68
|
Pod::UserInterface.warnings = [] # clean the warning in the prebuild step, it's duplicated.
|
|
@@ -75,13 +72,13 @@ module PodPrebuild
|
|
|
75
72
|
# Note: DSL is reloaded when creating an installer (Pod::Installer.new).
|
|
76
73
|
# Any mutation to DSL is highly discouraged
|
|
77
74
|
# --> Rather, perform mutation on PodPrebuild::StateStore instead
|
|
78
|
-
PodPrebuild::StateStore.excluded_pods +=
|
|
75
|
+
PodPrebuild::StateStore.excluded_pods += PodPrebuild.config.excluded_pods
|
|
79
76
|
end
|
|
80
77
|
|
|
81
78
|
def create_prebuild_sandbox
|
|
82
79
|
standard_sandbox = installer_context.sandbox
|
|
83
80
|
@prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sandbox)
|
|
84
|
-
Pod::UI.
|
|
81
|
+
Pod::UI.message "Create prebuild sandbox at #{@prebuild_sandbox.root}"
|
|
85
82
|
end
|
|
86
83
|
|
|
87
84
|
def detect_implicit_dependencies
|
|
@@ -104,13 +101,13 @@ module PodPrebuild
|
|
|
104
101
|
podfile: podfile,
|
|
105
102
|
pod_lockfile: installer_context.lockfile,
|
|
106
103
|
prebuilt_lockfile: prebuilt_lockfile,
|
|
107
|
-
validate_prebuilt_settings:
|
|
104
|
+
validate_prebuilt_settings: PodPrebuild.config.validate_prebuilt_settings,
|
|
108
105
|
generated_framework_path: prebuild_sandbox.generate_framework_path,
|
|
109
106
|
sandbox_root: prebuild_sandbox.root,
|
|
110
107
|
ignored_pods: PodPrebuild::StateStore.excluded_pods,
|
|
111
108
|
prebuilt_pod_names: @original_installer.prebuilt_pod_names
|
|
112
109
|
).validate
|
|
113
|
-
path_to_save_cache_validation =
|
|
110
|
+
path_to_save_cache_validation = PodPrebuild.config.save_cache_validation_to
|
|
114
111
|
@cache_validation.update_to(path_to_save_cache_validation) unless path_to_save_cache_validation.nil?
|
|
115
112
|
cache_validation.print_summary
|
|
116
113
|
PodPrebuild::StateStore.cache_validation = cache_validation
|