Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions lib/cocoapods-binary/Main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ def keep_source_code_for_prebuilt_frameworks!

Pod::UI.puts "🚀 Prebuild frameworks"

# Fetch original installer (which is running this pre-install hook) options,
# then pass them to our installer to perform update if needed
# Looks like this is the most appropriate way to figure out that something should be updated

update = nil
repo_update = nil

include ObjectSpace
ObjectSpace.each_object(Pod::Installer) { |installer|
update = installer.update
repo_update = installer.repo_update
}

# control features
Pod.is_prebuild_stage = true
Expand All @@ -82,11 +94,11 @@ def keep_source_code_for_prebuilt_frameworks!
# install
binary_installer = Pod::Installer.new(prebuild_sandbox, prebuild_podfile , nil)

if binary_installer.have_exact_prebuild_cache?
if binary_installer.have_exact_prebuild_cache? && !update
binary_installer.install_when_cache_hit!
else
binary_installer.repo_update = false
binary_installer.update = false
binary_installer.update = update
binary_installer.repo_update = repo_update
binary_installer.install!
end

Expand Down