Method: Pilot::BuildManager#list

Defined in:
lib/pilot/build_manager.rb

#list(options) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/pilot/build_manager.rb', line 78

def list(options)
  start(options)
  if config[:apple_id].to_s.length == 0 and config[:app_identifier].to_s.length == 0
    config[:app_identifier] = UI.input("App Identifier: ")
  end

  builds = app.all_processing_builds + app.builds
  # sort by upload_date
  builds.sort! { |a, b| a.upload_date <=> b.upload_date }
  rows = builds.collect { |build| describe_build(build) }

  puts Terminal::Table.new(
    title: "#{app.name} Builds".green,
    headings: ["Version #", "Build #", "Testing", "Installs", "Sessions"],
    rows: rows
  )
end