Commit fc1577c7 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4316 from CocoaPods/seg-init-only-native-targets

[Init] Only create target definitions for native targets
parents 27f75ca4 eccd6b33
...@@ -39,6 +39,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -39,6 +39,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Tim Bodeit](https://github.com/timbodeit) [Tim Bodeit](https://github.com/timbodeit)
[#2597](https://github.com/CocoaPods/CocoaPods/issues/2597) [#2597](https://github.com/CocoaPods/CocoaPods/issues/2597)
* Only include native targets when generating the Podfile in `pod init`.
[Samuel Giddins](https://github.com/segiddins)
[#2169](https://github.com/CocoaPods/CocoaPods/issues/2169)
## 0.39.0 (2015-10-09) ## 0.39.0 (2015-10-09)
......
...@@ -62,7 +62,7 @@ module Pod ...@@ -62,7 +62,7 @@ module Pod
# use_frameworks! # use_frameworks!
PLATFORM PLATFORM
project.targets.each do |target| project.native_targets.each do |target|
podfile << target_module(target) podfile << target_module(target)
end end
podfile << "\n" podfile << "\n"
......
...@@ -53,15 +53,17 @@ module Pod ...@@ -53,15 +53,17 @@ module Pod
project.new_target(:application, 'AppA', :ios) project.new_target(:application, 'AppA', :ios)
project.new_target(:application, 'AppB', :ios) project.new_target(:application, 'AppB', :ios)
project.new_target(:application, "App'C", :ios) project.new_target(:application, "App'C", :ios)
project.new_aggregate_target('Aggregate')
project.save project.save
run_command('init') run_command('init')
config.podfile.nil?.should == false config.podfile.should.not.be.nil
config.podfile.target_definitions.length.should == project.targets.length + 1 config.podfile.target_definitions.length.should == project.targets.length
config.podfile.target_definitions['AppA'].nil?.should == false config.podfile.target_definitions['AppA'].should.not.be.nil
config.podfile.target_definitions['AppB'].nil?.should == false config.podfile.target_definitions['AppB'].should.not.be.nil
config.podfile.target_definitions["App'C"].nil?.should == false config.podfile.target_definitions["App'C"].should.not.be.nil
config.podfile.target_definitions['Aggregate'].should.be.nil
end end
end end
......
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