#860: small refactoring
This commit is contained in:
parent
ba132b0824
commit
52cd67e1c3
|
@ -76,8 +76,11 @@ module BuildListsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def container_url
|
||||
"http://#{request.host_with_port}/downloads/#{@build_list.save_to_platform.name}/container/#{@build_list.id}".html_safe
|
||||
def container_url(full_path = true)
|
||||
p = ''
|
||||
p << "http://#{request.host_with_port}" if full_path
|
||||
p << "/downloads/#{@build_list.save_to_platform.name}/container/#{@build_list.id}"
|
||||
p.html_safe
|
||||
end
|
||||
|
||||
def log_reload_time_options
|
||||
|
|
|
@ -6,7 +6,7 @@ json.build_list do |json|
|
|||
json.build_log_url log_build_list_path(@build_list)
|
||||
|
||||
if @build_list.container_published?
|
||||
json.container_path container_url
|
||||
json.container_path container_url(false)
|
||||
else
|
||||
json.container_path ''
|
||||
end
|
||||
|
|
|
@ -68,8 +68,7 @@ module AbfWorker
|
|||
|
||||
def create_container_for(build_list)
|
||||
platform_path = "#{build_list.save_to_platform.path}/container/#{build_list.id}"
|
||||
system "rm -rf #{platform_path}"
|
||||
system "mkdir -p #{platform_path}"
|
||||
system "rm -rf #{platform_path} && mkdir -p #{platform_path}"
|
||||
|
||||
packages = {:sources => [], :binaries => {:x86_64 => [], :i586 => []}}
|
||||
packages[:sources] = build_list.packages.by_package_type('source').pluck(:sha1).compact
|
||||
|
|
Loading…
Reference in New Issue