Skip to content

Commit

Permalink
check for version
Browse files Browse the repository at this point in the history
  • Loading branch information
mguymon committed Sep 3, 2012
1 parent 5f731fa commit 1991c37
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/ruby/solr_sail/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module SolrSail
VERSION = IO.read("VERSION").strip

# Load VERSION file to VERSION var
if File.exists?( File.expand_path("#{File.dirname(__FILE__)}/../VERSION") )
VERSION = IO.read(File.expand_path("#{File.dirname(__FILE__)}/../VERSION")).strip

# VERSION file not found in gem dir, assume running from checkout
else
VERSION = IO.read(File.expand_path("VERSION")).strip
end
end

0 comments on commit 1991c37

Please sign in to comment.