Skip to content

Commit 4153d02

Browse files
author
jtimberman
committed
Also for CHEF-1018, version for indexer and rebuild.
1 parent 38f3fa0 commit 4153d02

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

chef-solr/lib/chef/solr/application/indexer.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ class Indexer < Chef::Application
9595
:long => "--amqp-vhost VHOST",
9696
:description => "The amqp vhost"
9797

98+
option :version,
99+
:short => "-v",
100+
:long => "--version",
101+
:description => "Show chef-solr version",
102+
:boolean => true,
103+
:proc => lambda {|v| puts "chef-solr: #{Chef::Solr::VERSION}"},
104+
:exit => 0
105+
98106
Signal.trap("INT") do
99107
begin
100108
AmqpClient.instance.stop

chef-solr/lib/chef/solr/application/rebuild.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ class Rebuild < Chef::Application
6464
:long => "--couchdb-url URL",
6565
:description => "The CouchDB URL"
6666

67+
option :version,
68+
:short => "-v",
69+
:long => "--version",
70+
:description => "Show chef-solr version",
71+
:boolean => true,
72+
:proc => lambda {|v| puts "chef-solr: #{Chef::Solr::VERSION}"},
73+
:exit => 0
74+
6775
def initialize
6876
super
6977

0 commit comments

Comments
 (0)