module Buildkite::Builder::Commands
Constants
- COMMANDS
Public Class Methods
print_help()
click to toggle source
# File lib/buildkite/builder/commands.rb, line 31 def self.print_help puts <<~HELP #{'SYNOPSIS'.bright} \t#{'buildkite-builder'.bright} COMMAND [OPTIONS] [PIPELINE] \t#{'To see available options for specific commands:'.color(:dimgray)} \t#{'buildkite-builder'.bright} COMMAND --help #{'COMMANDS'.bright} HELP COMMANDS.each do |command, klass| puts <<~HELP \t#{command.bright} \t#{const_get(klass).description.color(:dimgray)}\n HELP end end
run()
click to toggle source
# File lib/buildkite/builder/commands.rb, line 18 def self.run if ARGV.empty? || ARGV.first == '--help' return print_help end command = ARGV.shift unless (command_class = COMMANDS[command]) raise "Invalid command: #{command}" end const_get(command_class).execute end