Class: Jets::Command::BuildCommand

Inherits:
Base
  • Object
show all
Includes:
EnvironmentArgument
Defined in:
lib/jets/commands/build/build_command.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

banner, base_name, command_name, default_command_root, desc, engine?, executable, exit_on_failure?, #help, hide_command!, inherited, long_desc, namespace, perform, printing_commands, usage_path

Methods included from ApiHelpers

#check_for_error_message!, #no_token_exit!, #paging_params

Methods included from AwsHelpers

#find_stack, #first_run?

Methods included from AwsServices

#apigateway, #aws_lambda, #aws_options, #cfn, #dynamodb, #logs, #s3, #s3_resource, #sns, #sqs, #sts

Methods included from AwsServices::StackStatus

#lookup, #stack_exists?, #stack_in_progress?

Methods included from AwsServices::GlobalMemoist

included

Methods included from Actions

#load_generators, #load_tasks, #require_application!, #require_application_and_environment!, #set_application_directory!

Instance Method Details

#performObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/jets/commands/build/build_command.rb', line 9

def perform
  ENV['JETS_TEMPLATES'] = '1' if options[:templates]

  extract_environment_option_from_argument
  require_application_and_environment!

  puts "Building project for Lambda..."
  # run gets called from the CLI and does not have all the stack_options yet.
  # We compute it and change the options early here.
  @options.merge!(stack_type: stack_type, s3_bucket: Jets.s3_bucket)
  do_build
end