Skip to content

Commit

Permalink
Merge pull request #71 from TomasLinhart/copy-resources
Browse files Browse the repository at this point in the history
Copy resources
  • Loading branch information
segiddins authored Jul 22, 2018
2 parents 4752ef7 + 4ce6a5e commit a9f0d76
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/cocoapods-rome/post_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def copy_dsym_files(dsym_destination, configuration)
# can get upset about Info.plist containing references to the simulator SDK
frameworks = Pathname.glob("build/*/*/*.framework").reject { |f| f.to_s =~ /Pods.*\.framework/ }
frameworks += Pathname.glob("build/*.framework").reject { |f| f.to_s =~ /Pods.*\.framework/ }
resources = []
Pod::UI.puts "Built #{frameworks.count} #{'frameworks'.pluralize(frameworks.count)}"

destination.rmtree if destination.directory?
Expand All @@ -104,16 +105,18 @@ def copy_dsym_files(dsym_destination, configuration)
file_accessor = Pod::Sandbox::FileAccessor.new(sandbox.pod_dir(spec.root.name), consumer)
frameworks += file_accessor.vendored_libraries
frameworks += file_accessor.vendored_frameworks
resources += file_accessor.resources
end
end
frameworks.uniq!
resources.uniq!

Pod::UI.puts "Copying #{frameworks.count} #{'frameworks'.pluralize(frameworks.count)} " \
"to `#{destination.relative_path_from Pathname.pwd}`"

frameworks.each do |framework|
FileUtils.mkdir_p destination
FileUtils.cp_r framework, destination, :remove_destination => true
FileUtils.mkdir_p destination
(frameworks + resources).each do |file|
FileUtils.cp_r file, destination, :remove_destination => true
end

copy_dsym_files(sandbox_root.parent + 'dSYM', configuration) if enable_dsym
Expand Down

0 comments on commit a9f0d76

Please sign in to comment.