Class: Tebako::RuntimeCommand

Inherits:
BuildCommandBase show all
Defined in:
lib/tebako/build_commands.rb

Overview

tebako runtime build command group.

Instance Method Summary collapse

Instance Method Details

#buildObject



80
81
82
83
84
85
86
# File 'lib/tebako/build_commands.rb', line 80

def build
  run_reported("mode" => "runtime", "root" => Dir.pwd, "entry-point" => "stub.rb") do |options_manager|
    scenario = configure_scenario(options_manager)
    descriptor = Tebako::RuntimeBuilder.new(options_manager, scenario).build
    export_sdk(options_manager, scenario, descriptor) if options["sdk-output"]
  end
end

#install(sdk) ⇒ Object



92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/tebako/build_commands.rb', line 92

def install(sdk)
  manifest = Tebako::RuntimeSdk.install(
    archive: sdk,
    destination: options["destination"],
    expected_sha256: options["sha256"]
  )
  destination = File.expand_path(options["destination"])
  puts "Installed runtime SDK #{manifest.fetch("runtime_identity")} at #{destination}"
  puts "Use this SDK for press commands with TEBAKO_PREFIX=#{destination}"
rescue Tebako::Error => e
  raise Thor::Error, e.message
end