9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/deployme/cli.rb', line 9
def self.run(args)
runtime = OptionParser.run(args) do |parser|
(Provider.all + Notification.all).each do |mod|
parser.separator ''
parser.separator "#{mod.to_s.split('::').last.upcase} Options:"
mod.options(parser)
end
Deployment.options(parser)
parser.separator ''
parser.separator 'Common options:'
parser.on_tail('-h', '--help', 'Show this message') do
puts parser
exit
end
parser.on('--dry-run', 'Do not actually do anything') { |options| options.dry_run = true }
parser.on('--debug', 'Increase verbosity') { |options| options.debug = true }
parser.on_tail('--version', 'Show version') do
puts ::Deployme::VERSION
exit
end
end
Deployment.new(options: Options.new(runtime)).run
end
|