This commit is contained in:
Roberto Alsina 2024-07-05 12:05:51 -03:00
parent 2644cd4b86
commit 0ffd562cca
2 changed files with 5 additions and 7 deletions

View File

@ -14,10 +14,8 @@ module Faaso
funko.prepare_build(path: tmp_dir) funko.prepare_build(path: tmp_dir)
if options["--local"] if options["--local"]
funkos.each do |funko| Log.info { "Building function... #{funko.name} in #{tmp_dir}" }
Log.info { "Building function... #{funko.name} in #{tmp_dir}" } funko.build tmp_dir
funko.build tmp_dir
end
else # Running against a server else # Running against a server
# Create a tarball for the funko # Create a tarball for the funko
buf = IO::Memory.new buf = IO::Memory.new

View File

@ -58,8 +58,8 @@ module Funko
tar.each_entry do |entry| tar.each_entry do |entry|
dst = Path.new(tmp_dir, entry.name) dst = Path.new(tmp_dir, entry.name)
Dir.mkdir_p dst.dirname Dir.mkdir_p dst.dirname
File.open(Path.new(tmp_dir, entry.name), "w") do |dst| File.open(Path.new(tmp_dir, entry.name), "w") do |outf|
IO.copy entry.io, dst IO.copy entry.io, outf
end end
end end
end end
@ -150,7 +150,7 @@ module Funko
output: output, output: output,
error: output, error: output,
) )
Log.debug { "faaso output: #{output.to_s}" } Log.debug { "faaso output: #{output}" }
result = { result = {
"exit_code" => status.exit_code, "exit_code" => status.exit_code,
"output" => output.to_s, "output" => output.to_s,