lib/cocoapods-ppbuild/helper/prebuild_sandbox.rb in cocoapods-ppbuild-0.0.5 vs lib/cocoapods-ppbuild/helper/prebuild_sandbox.rb in cocoapods-ppbuild-1.0.0
- old
+ new
@@ -71,11 +71,10 @@
folder = framework_folder_path_for_target_name(pod_name)
return "" unless folder.exist?
flag_file_path = folder + "#{pod_name}.pod_name"
return "" unless flag_file_path.exist?
version = File.read(flag_file_path)
- Pod::UI.puts "............ version: #{version}"
version
end
def save_pod_name_for_target(target)
folder = framework_folder_path_for_target_name(target.name)
@@ -113,5 +112,24 @@
end
end.reject(&:nil?).uniq
end
end
end
+
+module Pod
+ class Sandbox
+ # hook 清除pod方法,得到删除的pod,通知主pod更新
+ clean_method = instance_method(:clean_pod)
+ define_method(:clean_pod) do |pod_name|
+ if Pod::is_prebuild_stage
+ if Pod::Prebuild::Passer.prebuild_pod_targets_changes.nil?
+ Pod::Prebuild::Passer.prebuild_pod_targets_changes = [pod_name]
+ else
+ Pod::Prebuild::Passer.prebuild_pod_targets_changes = (Pod::Prebuild::Passer.prebuild_pod_targets_changes + [pod_name]).uniq
+ end
+ end
+ clean_method.bind(self).(pod_name)
+ end
+ end
+end
+
+