Class: Tomo::Commands::Setup

Inherits:
Tomo::CLI::Command show all
Includes:
Tomo::CLI::CommonOptions, Tomo::CLI::DeployOptions, Tomo::CLI::ProjectOptions
Defined in:
lib/tomo/commands/setup.rb

Instance Method Summary collapse

Methods included from Tomo::CLI::CommonOptions

included

Methods included from Tomo::CLI::ProjectOptions

included

Methods included from Tomo::CLI::DeployOptions

included

Methods inherited from Tomo::CLI::Command

after_parse, arg, option, parse, parser

Methods included from Tomo::Colors

enabled?

Instance Method Details



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/tomo/commands/setup.rb', line 14

def banner
  <<~BANNER
    Usage: #{green('tomo setup')} #{yellow('[--dry-run] [options]')}

    Prepare the remote host for its first deploy by sequentially running the
    "setup" list of tasks specified in #{DEFAULT_CONFIG_PATH}. These tasks typically
    create directories, initialize data stores, install prerequisite tools,
    and perform other one-time actions that are necessary before a deploy can
    take place.

    Use the #{blue('--dry-run')} option to quickly simulate the setup without actually
    connecting to the host.

    More documentation and examples can be found here:

      #{blue('https://tomo.mattbrictson.com/commands/setup')}
  BANNER
end

#call(options) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/tomo/commands/setup.rb', line 33

def call(options)
  logger.info "tomo setup v#{Tomo::VERSION}"

  runtime = configure_runtime(options)
  plan = runtime.setup!

  log_completion(plan)
end

#summaryObject



10
11
12
# File 'lib/tomo/commands/setup.rb', line 10

def summary
  "Prepare the current project for its first deploy"
end