Class: EY::Serverside::Source::Archive
Overview
Deploy source for archive sourced deploy.
Instance Attribute Summary
#opts, #ref, #shell, #source_cache, #uri
Instance Method Summary
collapse
#initialize, require_opts
Instance Method Details
#create_revision_file_command(revision_file_path) ⇒ Object
7
8
9
|
# File 'lib/engineyard-serverside/source/archive.rb', line 7
def create_revision_file_command(revision_file_path)
"echo #{escape(@checksum || filename)} > #{escape(revision_file_path.to_s)}"
end
|
#gc_repository_cache ⇒ Object
11
12
13
|
# File 'lib/engineyard-serverside/source/archive.rb', line 11
def gc_repository_cache
end
|
#same?(previous_rev, current_rev, paths = nil) ⇒ Boolean
15
16
17
|
# File 'lib/engineyard-serverside/source/archive.rb', line 15
def same?(previous_rev, current_rev, paths=nil)
previous_rev == current_rev
end
|
#short_log_message(rev) ⇒ Object
19
20
21
|
# File 'lib/engineyard-serverside/source/archive.rb', line 19
def short_log_message(rev)
rev
end
|
#update_repository_cache ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/engineyard-serverside/source/archive.rb', line 23
def update_repository_cache
clean_cache
in_source_cache do
unless fetch && checksum
shell.fatal "archive fetch from #{URI.parse(uri).hostname} failed."
raise "archive fetch from #{URI.parse(uri).hostname} failed."
end
unless unarchive
shell.fatal "unarchive of #{filename} failed."
raise "unarchive of #{filename} failed."
end
end
end
|