Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify example-less projects #171

Merged
merged 1 commit into from
May 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions setup/ProjectManipulator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ def remove_demo_project
`rm -rf templates/ios/Example/PROJECT`
`rm -rf templates/swift/Example/PROJECT`

# Remove the section in the Podfile for the lib by removing top 3 lines after the source + using_frameworks!
# Replace the Podfile with a simpler one with only one target
podfile_path = project_folder + "/Podfile"
podfile_lines = File.read(podfile_path).lines
3.times do podfile_lines.delete_at 2 end
podfile_lines.delete_at 3 # inherit-statement
podfile_lines.pop # `end` matching the target
podfile_text = podfile_lines.join
podfile_text = <<-RUBY
use_frameworks!
target '#{test_target.name}' do
pod '#{@configurator.pod_name}', :path => '../'

${INCLUDED_PODS}
end
RUBY
File.open(podfile_path, "w") { |file| file.puts podfile_text }
end
end

def project_folder
File.dirname @xcodeproj_path
Expand Down