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

Add :checkout option to allow checkinable svn pod when combined with --no-clean #7

Merged
merged 1 commit into from
May 8, 2014
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
9 changes: 7 additions & 2 deletions lib/cocoapods-downloader/subversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Downloader
class Subversion < Base

def self.options
[:revision, :tag, :folder]
[:revision, :tag, :folder, :checkout]
end

def options_specific?
Expand All @@ -23,7 +23,8 @@ def checkout_options
executable :svn

def download!
output = svn!(%|#{export_subcommand} "#{reference_url}" "#{target_path}"|)
subcommand = options[:checkout] ? checkout_subcommand : export_subcommand
output = svn!(%|#{subcommand} "#{reference_url}" "#{target_path}"|)
store_exported_revision(output)
end

Expand All @@ -41,6 +42,10 @@ def export_subcommand
result = 'export --non-interactive --trust-server-cert --force'
end

def checkout_subcommand
result = 'checkout --non-interactive --trust-server-cert --force'
end

def reference_url
result = url.dup
result << '/' << options[:folder] if options[:folder]
Expand Down