Class: Athlete::CLI
- Inherits:
-
Thor
show all
- Includes:
- Logging, Thor::Actions
- Defined in:
- lib/athlete/cli.rb
Instance Method Summary
collapse
Methods included from Logging
#debug, #fatal, #get_loglevel, #info, #loglevel, #warn
Instance Method Details
#build(build_name) ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/athlete/cli.rb', line 35
def build(build_name)
setup
build = Athlete::Build.builds[build_name]
if build
do_build(build, options[:push])
else
fatal "Could not locate a build in the configuration named '#{build_name}'"
exit 1
end
end
|
#deploy(deployment_name) ⇒ Object
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/athlete/cli.rb', line 52
def deploy(deployment_name)
setup
deployment = Athlete::Deployment.deployments[deployment_name]
if deployment
do_deploy(deployment)
else
fatal "Could not locate a deployment in the configuration named '#{deployment_name}'"
exit 1
end
end
|
#list(type = nil) ⇒ Object
20
21
22
23
24
|
# File 'lib/athlete/cli.rb', line 20
def list(type = nil)
setup
output_builds if type.nil? || type == 'builds'
output_deployments if type.nil? || type == 'deployments'
end
|