Commit 352e8d1c authored by Jeremy Slater's avatar Jeremy Slater

Keep shell script phase simple and static

The copy resources shell script phase was previously updated every 
time the pods were changed.  This moves the updates to the integration 
library copy resources script and restores the original static single 
line from before the per pod library code.
parent 195ec17f
...@@ -217,11 +217,20 @@ module Pod ...@@ -217,11 +217,20 @@ module Pod
def create_copy_resources_script def create_copy_resources_script
path = library.copy_resources_script_path path = library.copy_resources_script_path
UI.message "- Generating copy resources script at #{UI.path(path)}" do UI.message "- Generating copy resources script at #{UI.path(path)}" do
resources = library.file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten if library.spec
resources << bridge_support_file if bridge_support_file resources = library.file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
generator = Generator::CopyResourcesScript.new(resources) resources << bridge_support_file if bridge_support_file
generator.save_as(path) generator = Generator::CopyResourcesScript.new(resources)
add_file_to_support_group(path) generator.save_as(path)
add_file_to_support_group(path)
else
path.open('w') do |script|
library.libraries.each do |lib|
script.puts "#{lib.copy_resources_script_relative_path}\n"
end
end
system("chmod +x '#{path}'")
end
end end
end end
......
...@@ -133,9 +133,8 @@ module Pod ...@@ -133,9 +133,8 @@ module Pod
native_targets.each do |native_target| native_targets.each do |native_target|
phase = native_target.shell_script_build_phases.select { |bp| bp.name == phase_name }.first || phase = native_target.shell_script_build_phases.select { |bp| bp.name == phase_name }.first ||
native_target.new_shell_script_build_phase(phase_name) native_target.new_shell_script_build_phase(phase_name)
phase.shell_script = target.libraries.map do |lib| path = target.copy_resources_script_relative_path
"#{lib.copy_resources_script_relative_path}" phase.shell_script = %{"#{path}"\n}
end.join("\n")
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment