Last active
January 5, 2020 15:07
-
-
Save looseyi/97820689ff80aa58c9791ece45d22a96 to your computer and use it in GitHub Desktop.
fetch_remote_framework_for_target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fetch_remote_framework_for_target(target) | |
existed_remote_framework = self.remote_framework_names.include?(zip_framework_name(target)) | |
return false unless existed_remote_framework | |
begin | |
zip_framework_path = self.ftp.get(remote_framework_dir + zip_framework_name(target)) | |
rescue | |
Pod::UI.puts "Retry fetch remote fameworks" | |
self.reset_ftp | |
zip_framework_path = self.ftp.get(remote_framework_dir + zip_framework_name(target)) | |
end | |
return false unless File.exist?(zip_framework_path) | |
target_framework_path = generate_framework_path + target.name | |
return true unless Dir.empty?(target_framework_path) | |
extract_framework_path = generate_framework_path + target.name | |
zf = Zipper.new(zip_framework_path, extract_framework_path) | |
zf.extract() | |
true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment