diff --git a/lib/cocoapods-downloader/subversion.rb b/lib/cocoapods-downloader/subversion.rb index 050443b..cbce7c6 100644 --- a/lib/cocoapods-downloader/subversion.rb +++ b/lib/cocoapods-downloader/subversion.rb @@ -3,7 +3,7 @@ module Downloader class Subversion < Base def self.options - [:revision, :tag, :folder] + [:revision, :tag, :folder, :checkout] end def options_specific? @@ -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 @@ -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]