Commit 47be0099 authored by Samuel Giddins's avatar Samuel Giddins

[Target] Extract default build configurations into a constant

parent a7620b0d
...@@ -441,7 +441,7 @@ module Pod ...@@ -441,7 +441,7 @@ module Pod
user_project = nil user_project = nil
client_root = config.installation_root.realpath client_root = config.installation_root.realpath
user_target_uuids = [] user_target_uuids = []
user_build_configurations = target_definition.build_configurations || { 'Release' => :release, 'Debug' => :debug } user_build_configurations = target_definition.build_configurations || Target::DEFAULT_BUILD_CONFIGURATIONS
archs = [] archs = []
if target_definition.platform && target_definition.platform.name == :osx if target_definition.platform && target_definition.platform.name == :osx
archs = ['$(ARCHS_STANDARD_64_BIT)'] archs = ['$(ARCHS_STANDARD_64_BIT)']
......
...@@ -10,6 +10,7 @@ module Pod ...@@ -10,6 +10,7 @@ module Pod
class Target class Target
DEFAULT_VERSION = '1.0.0'.freeze DEFAULT_VERSION = '1.0.0'.freeze
DEFAULT_NAME = 'Default'.freeze DEFAULT_NAME = 'Default'.freeze
DEFAULT_BUILD_CONFIGURATIONS = { 'Release' => :release, 'Debug' => :debug }.freeze
# @return [Sandbox] The sandbox where the Pods should be installed. # @return [Sandbox] The sandbox where the Pods should be installed.
# #
......
...@@ -146,7 +146,7 @@ def fixture_pod_target_with_specs(specs, host_requires_frameworks = false, user_ ...@@ -146,7 +146,7 @@ def fixture_pod_target_with_specs(specs, host_requires_frameworks = false, user_
target_definitions, file_accessors, scope_suffix) target_definitions, file_accessors, scope_suffix)
end end
def fixture_aggregate_target(pod_targets = [], host_requires_frameworks = false, user_build_configurations = { 'Release' => :release }, def fixture_aggregate_target(pod_targets = [], host_requires_frameworks = false, user_build_configurations = Pod::Target::DEFAULT_BUILD_CONFIGURATIONS,
archs = [], platform = Pod::Platform.new(:ios, '6.0'), target_definition = nil) archs = [], platform = Pod::Platform.new(:ios, '6.0'), target_definition = nil)
target_definition ||= pod_targets.flat_map(&:target_definitions).first || fixture_target_definition target_definition ||= pod_targets.flat_map(&:target_definitions).first || fixture_target_definition
Pod::AggregateTarget.new(config.sandbox, host_requires_frameworks, user_build_configurations, archs, platform, Pod::AggregateTarget.new(config.sandbox, host_requires_frameworks, user_build_configurations, archs, platform,
......
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