Unverified Commit b0ecb70b authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7342 from dnkoutso/fix_validator_edge_case

Do not attempt compilation for pods with no sources and skipping import validation
parents c05808b2 b405a090
...@@ -18,7 +18,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -18,7 +18,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* None. * Do not attempt compilation for pods with no sources and skipping import validation
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7336](https://github.com/CocoaPods/CocoaPods/issues/7336)
## 1.4.0 (2018-01-18) ## 1.4.0 (2018-01-18)
......
...@@ -545,21 +545,25 @@ module Pod ...@@ -545,21 +545,25 @@ module Pod
# Performs platform specific analysis. It requires to download the source # Performs platform specific analysis. It requires to download the source
# at each iteration # at each iteration
# #
# @note Xcode warnings are treaded as notes because the spec maintainer # @note Xcode warnings are treated as notes because the spec maintainer
# might not be the author of the library # might not be the author of the library
# #
# @return [void] # @return [void]
# #
def build_pod def build_pod
if !xcodebuild_available? if !xcodebuild_available?
UI.warn "Skipping compilation with `xcodebuild' because it can't be found.\n".yellow UI.warn "Skipping compilation with `xcodebuild` because it can't be found.\n".yellow
else else
UI.message "\nBuilding with xcodebuild.\n".yellow do UI.message "\nBuilding with `xcodebuild`.\n".yellow do
scheme = if skip_import_validation? scheme = if skip_import_validation?
@installer.pod_targets.find { |pt| pt.pod_name == spec.root.name }.label pod_target = @installer.pod_targets.find { |pt| pt.pod_name == spec.root.name }
pod_target.label if pod_target.should_build?
else else
'App' 'App'
end end
if scheme.nil?
UI.warn "Skipping compilation with `xcodebuild` because target contains no sources.\n".yellow
else
output = xcodebuild('build', scheme, 'Release') output = xcodebuild('build', scheme, 'Release')
UI.puts output UI.puts output
parsed_output = parse_xcodebuild_output(output) parsed_output = parse_xcodebuild_output(output)
...@@ -567,19 +571,20 @@ module Pod ...@@ -567,19 +571,20 @@ module Pod
end end
end end
end end
end
# Builds and runs all test sources associated with the current specification being validated. # Builds and runs all test sources associated with the current specification being validated.
# #
# @note Xcode warnings are treaded as notes because the spec maintainer # @note Xcode warnings are treated as notes because the spec maintainer
# might not be the author of the library # might not be the author of the library
# #
# @return [void] # @return [void]
# #
def test_pod def test_pod
if !xcodebuild_available? if !xcodebuild_available?
UI.warn "Skipping test validation with `xcodebuild' because it can't be found.\n".yellow UI.warn "Skipping test validation with `xcodebuild` because it can't be found.\n".yellow
else else
UI.message "\nTesting with xcodebuild.\n".yellow do UI.message "\nTesting with `xcodebuild`.\n".yellow do
pod_target = @installer.pod_targets.find { |pt| pt.pod_name == spec.root.name } pod_target = @installer.pod_targets.find { |pt| pt.pod_name == spec.root.name }
consumer.spec.test_specs.each do |test_spec| consumer.spec.test_specs.each do |test_spec|
scheme = pod_target.native_target_for_spec(test_spec) scheme = pod_target.native_target_for_spec(test_spec)
......
Subproject commit 5ec8622af1b9adb969d66b5b01bb88e016bca627 Subproject commit 47f6e71c0f9001d2da80686e9b90870ad394e228
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