Class: PodPrebuild::PreInstallHook
- Inherits:
-
Object
- Object
- PodPrebuild::PreInstallHook
- Includes:
- ObjectSpace
- Defined in:
- lib/cocoapods-binary-cache/hooks/pre_install.rb
Instance Attribute Summary collapse
-
#cache_validation ⇒ Object
readonly
Returns the value of attribute cache_validation.
-
#installer_context ⇒ Object
readonly
Returns the value of attribute installer_context.
-
#podfile ⇒ Object
readonly
Returns the value of attribute podfile.
-
#prebuild_sandbox ⇒ Object
readonly
Returns the value of attribute prebuild_sandbox.
Instance Method Summary collapse
-
#initialize(installer_context) ⇒ PreInstallHook
constructor
A new instance of PreInstallHook.
- #run ⇒ Object
Constructor Details
#initialize(installer_context) ⇒ PreInstallHook
7 8 9 10 11 12 13 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 7 def initialize(installer_context) @installer_context = installer_context @podfile = installer_context.podfile = {} @prebuild_sandbox = nil @cache_validation = nil end |
Instance Attribute Details
#cache_validation ⇒ Object (readonly)
Returns the value of attribute cache_validation.
5 6 7 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 5 def cache_validation @cache_validation end |
#installer_context ⇒ Object (readonly)
Returns the value of attribute installer_context.
5 6 7 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 5 def installer_context @installer_context end |
#podfile ⇒ Object (readonly)
Returns the value of attribute podfile.
5 6 7 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 5 def podfile @podfile end |
#prebuild_sandbox ⇒ Object (readonly)
Returns the value of attribute prebuild_sandbox.
5 6 7 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 5 def prebuild_sandbox @prebuild_sandbox end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cocoapods-binary-cache/hooks/pre_install.rb', line 15 def run require_relative "../pod-binary/helper/feature_switches" return if Pod.is_prebuild_stage log_section "🚀 Prebuild frameworks" ensure_valid_podfile save_installation_states prepare_environment create_prebuild_sandbox Pod::UI.section("Detect implicit dependencies") { detect_implicit_dependencies } Pod::UI.section("Validate prebuilt cache") { validate_cache } prebuild! if Pod::Podfile::DSL.prebuild_job? reset_environment log_section "🤖 Resume pod installation" require_relative "../pod-binary/integration" end |