Module: Aptible::CLI::Subcommands::Rebuild

Included in:
Agent
Defined in:
lib/aptible/cli/subcommands/rebuild.rb

Class Method Summary collapse

Class Method Details

.included(thor) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/aptible/cli/subcommands/rebuild.rb', line 5

def self.included(thor)
  thor.class_eval do
    include Helpers::Operation
    include Helpers::App

    desc 'rebuild', 'Rebuild an app, and restart its services'
    app_options
    def rebuild
      app = ensure_app(options)
      operation = app.create_operation!(type: 'rebuild')
      CLI.logger.info 'Rebuilding app...'
      attach_to_operation_logs(operation)
    end
  end
end