Minor refactor

This commit is contained in:
Roberto Alsina 2024-07-08 07:37:01 -03:00
parent 379b4e2472
commit d93c8518da
2 changed files with 46 additions and 47 deletions

View File

@ -16,7 +16,8 @@ module Faaso
if options["--local"] if options["--local"]
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
else # Running against a server next
end
Faaso.check_version Faaso.check_version
# Create a tarball for the funko # Create a tarball for the funko
buf = IO::Memory.new buf = IO::Memory.new
@ -46,7 +47,6 @@ module Faaso
url = "#{Config.server}funkos/build/" url = "#{Config.server}funkos/build/"
begin
user, password = Config.auth user, password = Config.auth
Log.info { "Uploading funko to #{Config.server}" } Log.info { "Uploading funko to #{Config.server}" }
Log.info { "Starting remote build:" } Log.info { "Starting remote build:" }
@ -65,8 +65,6 @@ module Faaso
Log.error(exception: ex) { "Error building funko #{funko.name} from #{funko.path}" } Log.error(exception: ex) { "Error building funko #{funko.name} from #{funko.path}" }
return 1 return 1
end end
end
end
0 0
end end
end end

View File

@ -14,6 +14,7 @@ FaaSO CLI tool.
Usage: Usage:
faaso build FOLDER ... [-v <level>] [-l] [--no-runtime] faaso build FOLDER ... [-v <level>] [-l] [--no-runtime]
faaso deploy FUNKO [-v <level>] [-l]
faaso export SOURCE DESTINATION [-v <level>] faaso export SOURCE DESTINATION [-v <level>]
faaso login [-v <level>] faaso login [-v <level>]
faaso new -r runtime FOLDER [-v <level>] faaso new -r runtime FOLDER [-v <level>]