lib/cocoapods-rome/post_install.rb in cocoapods-rome-1.0.0 vs lib/cocoapods-rome/post_install.rb in cocoapods-rome-1.0.1

- old
+ new

@@ -60,11 +60,11 @@ end end Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_context, user_options| enable_dsym = user_options.fetch('dsym', true) - configuration = user_options.fetch('configuration', true) + configuration = user_options.fetch('configuration', 'Debug') if user_options["pre_compile"] user_options["pre_compile"].call(installer_context) end sandbox_root = Pathname(installer_context.sandbox_root) @@ -90,33 +90,42 @@ raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory? # Make sure the device target overwrites anything in the simulator build, otherwise iTunesConnect # 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/ } + 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? installer_context.umbrella_targets.each do |umbrella| umbrella.specs.each do |spec| consumer = spec.consumer(umbrella.platform_name) 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 build_dir.rmtree if build_dir.directory? + + if user_options["post_compile"] + user_options["post_compile"].call(installer_context) + end end