Commit cfb74e5f authored by Fabio Pelosin's avatar Fabio Pelosin

[UI] Tune verbose output

parent 270907f1
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AFNetworking Example-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AFNetworking Example/Pods-AFNetworking Example-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
......
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AFNetworking iOS Example-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AFNetworking iOS Example/Pods-AFNetworking iOS Example-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
E4419DF1E8B742E49777FFE0 /* Check Pods Manifest.lock */ = { E4419DF1E8B742E49777FFE0 /* Check Pods Manifest.lock */ = {
......
...@@ -402,7 +402,7 @@ module Pod ...@@ -402,7 +402,7 @@ module Pod
# @return [void] # @return [void]
# #
def install_libraries def install_libraries
UI.message '- Installing libraries' do UI.message '- Installing targets' do
pod_targets.sort_by(&:name).each do |pod_target| pod_targets.sort_by(&:name).each do |pod_target|
next if pod_target.target_definition.empty? next if pod_target.target_definition.empty?
target_installer = PodTargetInstaller.new(sandbox, pod_target) target_installer = PodTargetInstaller.new(sandbox, pod_target)
......
...@@ -47,10 +47,10 @@ module Pod ...@@ -47,10 +47,10 @@ module Pod
def analyze(allow_fetches = true) def analyze(allow_fetches = true)
update_repositories_if_needed if allow_fetches update_repositories_if_needed if allow_fetches
@result = AnalysisResult.new @result = AnalysisResult.new
compute_target_platforms
@result.podfile_state = generate_podfile_state @result.podfile_state = generate_podfile_state
@locked_dependencies = generate_version_locking_dependencies @locked_dependencies = generate_version_locking_dependencies
compute_target_platforms
fetch_external_sources if allow_fetches fetch_external_sources if allow_fetches
@result.specs_by_target = resolve_dependencies @result.specs_by_target = resolve_dependencies
@result.specifications = generate_specifications @result.specifications = generate_specifications
...@@ -487,7 +487,7 @@ module Pod ...@@ -487,7 +487,7 @@ module Pod
# @todo Is assigning the platform to the target definition the best way # @todo Is assigning the platform to the target definition the best way
# to go? # to go?
# #
def compute_archs_for_target_definition(_target_definition, user_targets) def compute_archs_for_target_definition(target_definition, user_targets)
archs = [] archs = []
user_targets.each do |target| user_targets.each do |target|
target_archs = target.common_resolved_build_setting('ARCHS') target_archs = target.common_resolved_build_setting('ARCHS')
...@@ -495,7 +495,9 @@ module Pod ...@@ -495,7 +495,9 @@ module Pod
end end
archs = archs.compact.uniq.sort archs = archs.compact.uniq.sort
UI.puts("Using `ARCHS` setting to build architectures: (`#{archs.join('`, `')}`)") UI.message("Using `ARCHS` setting to build architectures of " \
"target `#{target_definition.label}`: " \
"(`#{archs.join('`, `')}`)")
archs.length > 1 ? archs : archs.first archs.length > 1 ? archs : archs.first
end end
...@@ -508,6 +510,7 @@ module Pod ...@@ -508,6 +510,7 @@ module Pod
# @return [void] # @return [void]
# #
def compute_target_platforms def compute_target_platforms
UI.section 'Inspecting targets to integrate' do
podfile.target_definition_list.each do |target_definition| podfile.target_definition_list.each do |target_definition|
if config.integrate_targets? if config.integrate_targets?
project_path = compute_user_project_path(target_definition) project_path = compute_user_project_path(target_definition)
...@@ -523,6 +526,7 @@ module Pod ...@@ -523,6 +526,7 @@ module Pod
end end
end end
end end
end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -21,8 +21,7 @@ module Pod ...@@ -21,8 +21,7 @@ module Pod
# Migrates from CocoaPods versions previous to 0.34. # Migrates from CocoaPods versions previous to 0.34.
# #
def migrate_to_0_34(sandbox) def migrate_to_0_34(sandbox)
title_options = { :verbose_prefix => '-> '.green } UI.message('Migrating to CocoaPods 0.34') do
UI.titled_section('Migrating to CocoaPods 0.34'.green, title_options) do
delete(sandbox.root + 'Headers') delete(sandbox.root + 'Headers')
make_path(sandbox.headers_root) make_path(sandbox.headers_root)
......
...@@ -70,13 +70,11 @@ module Pod ...@@ -70,13 +70,11 @@ module Pod
# #
def create_dummy_source def create_dummy_source
path = library.dummy_source_path path = library.dummy_source_path
UI.message "- Generating dummy source file at #{UI.path(path)}" do
generator = Generator::DummySource.new(library.label) generator = Generator::DummySource.new(library.label)
generator.save_as(path) generator.save_as(path)
file_reference = add_file_to_support_group(path) file_reference = add_file_to_support_group(path)
target.source_build_phase.add_file_reference(file_reference) target.source_build_phase.add_file_reference(file_reference)
end end
end
# @return [PBXNativeTarget] the target generated by the installation # @return [PBXNativeTarget] the target generated by the installation
# process. # process.
......
...@@ -45,7 +45,6 @@ module Pod ...@@ -45,7 +45,6 @@ module Pod
def create_xcconfig_file def create_xcconfig_file
target.build_configurations.each do |configuration| target.build_configurations.each do |configuration|
path = library.xcconfig_path(configuration.name) path = library.xcconfig_path(configuration.name)
UI.message "- Generating #{configuration.name} xcconfig file at #{UI.path(path)}" do
gen = Generator::XCConfig::AggregateXCConfig.new(library, configuration.name) gen = Generator::XCConfig::AggregateXCConfig.new(library, configuration.name)
gen.save_as(path) gen.save_as(path)
library.xcconfigs[configuration.name] = gen.xcconfig library.xcconfigs[configuration.name] = gen.xcconfig
...@@ -53,19 +52,16 @@ module Pod ...@@ -53,19 +52,16 @@ module Pod
configuration.base_configuration_reference = xcconfig_file_ref configuration.base_configuration_reference = xcconfig_file_ref
end end
end end
end
# Generates a header which allows to inspect at compile time the installed # Generates a header which allows to inspect at compile time the installed
# pods and the installed specifications of a pod. # pods and the installed specifications of a pod.
# #
def create_target_environment_header def create_target_environment_header
path = library.target_environment_header_path path = library.target_environment_header_path
UI.message "- Generating target environment header at #{UI.path(path)}" do
generator = Generator::TargetEnvironmentHeader.new(library.specs_by_build_configuration) generator = Generator::TargetEnvironmentHeader.new(library.specs_by_build_configuration)
generator.save_as(path) generator.save_as(path)
add_file_to_support_group(path) add_file_to_support_group(path)
end end
end
# Generates the bridge support metadata if requested by the {Podfile}. # Generates the bridge support metadata if requested by the {Podfile}.
# #
...@@ -78,7 +74,6 @@ module Pod ...@@ -78,7 +74,6 @@ module Pod
def create_bridge_support_file def create_bridge_support_file
if target_definition.podfile.generate_bridge_support? if target_definition.podfile.generate_bridge_support?
path = library.bridge_support_path path = library.bridge_support_path
UI.message "- Generating BridgeSupport metadata at #{UI.path(path)}" do
headers = target.headers_build_phase.files.map { |bf| sandbox.root + bf.file_ref.path } headers = target.headers_build_phase.files.map { |bf| sandbox.root + bf.file_ref.path }
generator = Generator::BridgeSupport.new(headers) generator = Generator::BridgeSupport.new(headers)
generator.save_as(path) generator.save_as(path)
...@@ -86,7 +81,6 @@ module Pod ...@@ -86,7 +81,6 @@ module Pod
@bridge_support_file = path.relative_path_from(sandbox.root) @bridge_support_file = path.relative_path_from(sandbox.root)
end end
end end
end
# Creates a script that copies the resources to the bundle of the client # Creates a script that copies the resources to the bundle of the client
# target. # target.
...@@ -98,7 +92,6 @@ module Pod ...@@ -98,7 +92,6 @@ 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
file_accessors = library.pod_targets.map(&:file_accessors).flatten file_accessors = library.pod_targets.map(&:file_accessors).flatten
resource_paths = file_accessors.map { |accessor| accessor.resources.flatten.map { |res| res.relative_path_from(project.path.dirname) } }.flatten resource_paths = file_accessors.map { |accessor| accessor.resources.flatten.map { |res| res.relative_path_from(project.path.dirname) } }.flatten
resource_bundles = file_accessors.map { |accessor| accessor.resource_bundles.keys.map { |name| "${BUILT_PRODUCTS_DIR}/#{name}.bundle" } }.flatten resource_bundles = file_accessors.map { |accessor| accessor.resource_bundles.keys.map { |name| "${BUILT_PRODUCTS_DIR}/#{name}.bundle" } }.flatten
...@@ -110,7 +103,6 @@ module Pod ...@@ -110,7 +103,6 @@ module Pod
generator.save_as(path) generator.save_as(path)
add_file_to_support_group(path) add_file_to_support_group(path)
end end
end
# Generates the acknowledgement files (markdown and plist) for the target. # Generates the acknowledgement files (markdown and plist) for the target.
# #
...@@ -120,14 +112,12 @@ module Pod ...@@ -120,14 +112,12 @@ module Pod
basepath = library.acknowledgements_basepath basepath = library.acknowledgements_basepath
Generator::Acknowledgements.generators.each do |generator_class| Generator::Acknowledgements.generators.each do |generator_class|
path = generator_class.path_from_basepath(basepath) path = generator_class.path_from_basepath(basepath)
UI.message "- Generating acknowledgements at #{UI.path(path)}" do
file_accessors = library.pod_targets.map(&:file_accessors).flatten file_accessors = library.pod_targets.map(&:file_accessors).flatten
generator = generator_class.new(file_accessors) generator = generator_class.new(file_accessors)
generator.save_as(path) generator.save_as(path)
add_file_to_support_group(path) add_file_to_support_group(path)
end end
end end
end
# @return [Pathname] the path of the bridge support file relative to the # @return [Pathname] the path of the bridge support file relative to the
# sandbox. # sandbox.
......
...@@ -33,7 +33,6 @@ module Pod ...@@ -33,7 +33,6 @@ module Pod
# @return [void] # @return [void]
# #
def add_files_to_build_phases def add_files_to_build_phases
UI.message '- Adding Build files' do
library.file_accessors.each do |file_accessor| library.file_accessors.each do |file_accessor|
consumer = file_accessor.spec_consumer consumer = file_accessor.spec_consumer
flags = compiler_flags_for_consumer(consumer) flags = compiler_flags_for_consumer(consumer)
...@@ -45,7 +44,6 @@ module Pod ...@@ -45,7 +44,6 @@ module Pod
target.add_file_references(other_file_refs, nil) target.add_file_references(other_file_refs, nil)
end end
end end
end
# Adds the resources of the Pods to the Pods project. # Adds the resources of the Pods to the Pods project.
# #
...@@ -55,7 +53,6 @@ module Pod ...@@ -55,7 +53,6 @@ module Pod
# @return [void] # @return [void]
# #
def add_resources_bundle_targets def add_resources_bundle_targets
UI.message '- Adding resource bundles to Pods project' do
library.file_accessors.each do |file_accessor| library.file_accessors.each do |file_accessor|
file_accessor.resource_bundles.each do |bundle_name, paths| file_accessor.resource_bundles.each do |bundle_name, paths|
# Add a dependency on an existing Resource Bundle target if possible # Add a dependency on an existing Resource Bundle target if possible
...@@ -75,7 +72,6 @@ module Pod ...@@ -75,7 +72,6 @@ module Pod
end end
end end
end end
end
# Generates the contents of the xcconfig file and saves it to disk. # Generates the contents of the xcconfig file and saves it to disk.
# #
...@@ -84,14 +80,11 @@ module Pod ...@@ -84,14 +80,11 @@ module Pod
def create_xcconfig_file def create_xcconfig_file
path = library.xcconfig_path path = library.xcconfig_path
public_gen = Generator::XCConfig::PublicPodXCConfig.new(library) public_gen = Generator::XCConfig::PublicPodXCConfig.new(library)
UI.message "- Generating public xcconfig file at #{UI.path(path)}" do
public_gen.save_as(path) public_gen.save_as(path)
add_file_to_support_group(path) add_file_to_support_group(path)
end
path = library.xcconfig_private_path path = library.xcconfig_private_path
private_gen = Generator::XCConfig::PrivatePodXCConfig.new(library, public_gen.xcconfig) private_gen = Generator::XCConfig::PrivatePodXCConfig.new(library, public_gen.xcconfig)
UI.message "- Generating private xcconfig file at #{UI.path(path)}" do
private_gen.save_as(path) private_gen.save_as(path)
xcconfig_file_ref = add_file_to_support_group(path) xcconfig_file_ref = add_file_to_support_group(path)
...@@ -99,7 +92,6 @@ module Pod ...@@ -99,7 +92,6 @@ module Pod
c.base_configuration_reference = xcconfig_file_ref c.base_configuration_reference = xcconfig_file_ref
end end
end end
end
# Creates a prefix header file which imports `UIKit` or `Cocoa` according # Creates a prefix header file which imports `UIKit` or `Cocoa` according
# to the platform of the target. This file also include any prefix header # to the platform of the target. This file also include any prefix header
...@@ -109,7 +101,6 @@ module Pod ...@@ -109,7 +101,6 @@ module Pod
# #
def create_prefix_header def create_prefix_header
path = library.prefix_header_path path = library.prefix_header_path
UI.message "- Generating prefix header at #{UI.path(path)}" do
generator = Generator::PrefixHeader.new(library.file_accessors, library.platform) generator = Generator::PrefixHeader.new(library.file_accessors, library.platform)
generator.imports << library.target_environment_header_path.basename generator.imports << library.target_environment_header_path.basename
generator.save_as(path) generator.save_as(path)
...@@ -120,7 +111,6 @@ module Pod ...@@ -120,7 +111,6 @@ module Pod
c.build_settings['GCC_PREFIX_HEADER'] = relative_path.to_s c.build_settings['GCC_PREFIX_HEADER'] = relative_path.to_s
end end
end end
end
ENABLE_OBJECT_USE_OBJC_FROM = { ENABLE_OBJECT_USE_OBJC_FROM = {
:ios => Version.new('6'), :ios => Version.new('6'),
......
...@@ -178,10 +178,8 @@ module Pod ...@@ -178,10 +178,8 @@ module Pod
# integration. # integration.
# #
def integration_message def integration_message
"Integrating Pod #{'target'.pluralize(target.pod_targets.size)} " \ "Integrating target `#{target.name}` " \
"`#{target.pod_targets.map(&:name).to_sentence}` " \ "(#{UI.path target.user_project_path} project)"
"into aggregate target #{target.name} " \
"of project #{UI.path target.user_project_path}."
end end
end end
end end
......
...@@ -175,10 +175,10 @@ module Pod ...@@ -175,10 +175,10 @@ module Pod
@sut.stubs(:validate_homepage) @sut.stubs(:validate_homepage)
WebMock::API. WebMock::API.
stub_request(:head, 'banana-corp.local/valid-image.png'). stub_request(:head, 'banana-corp.local/valid-image.png').
to_return({ to_return(
:status => 200, :status => 200,
:headers => { 'Content-Type' => 'image/png' } :headers => { 'Content-Type' => 'image/png' }
}) )
end end
it 'checks if the screenshots are valid' do it 'checks if the screenshots are valid' do
......
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