Support building from Subversion repositories
Adds a new DownloadStrategy that checks files out from Subversion to the cache, then exports over to the temp folder for the build. To use checkout with the svn:// protocol or reimplement download_strategy and return SubversionDownloadStrategy.
This commit is contained in:
parent
0eaf4bbcd9
commit
57a86034a3
@ -72,6 +72,23 @@ private
|
||||
end
|
||||
end
|
||||
|
||||
class SubversionDownloadStrategy <AbstractDownloadStrategy
|
||||
def fetch
|
||||
ohai "Checking out #{@url}"
|
||||
@co=HOMEBREW_CACHE+@unique_token
|
||||
unless @co.exist?
|
||||
safe_system 'svn', 'checkout', @url, @co
|
||||
else
|
||||
# TODO svn up?
|
||||
puts "Repository already checked out"
|
||||
end
|
||||
end
|
||||
def stage
|
||||
# Force the export, since the target directory will already exist
|
||||
safe_system 'svn', 'export', '--force', @co, Dir.pwd
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
class ExecutionError <RuntimeError
|
||||
def initialize cmd, args=[]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user