Class: CircleCI::CLI::Command::BuildCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/circleci/cli/command/build_command.rb

Class Method Summary collapse

Methods inherited from BaseCommand

build_number, project_name, reponame, setup_token, should_be_pretty

Class Method Details

.run(options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/circleci/cli/command/build_command.rb', line 8

def run(options)
  setup_token
  username, reponame = project_name(options).split('/')
  build =
    if options.last
      get_last_build(username, reponame)
    else
      get_build(username, reponame, options)
    end
  say Printer::StepPrinter.new(build.steps).to_s
end