Skip to content

Commit

Permalink
Always use the most recent release of solr
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Apr 27, 2017
1 parent 4b3e868 commit bd5bb11
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tasks/blacklight.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc

desc "Run test suite"
task :ci => ['blacklight:generate'] do
SolrWrapper.wrap do |solr|
# rubocop:disable Style/SpaceInsidePercentLiteralDelimiters
# If a version of solr is not specified, check for one on the apache site
puts "grep is #{`curl -s 'http://lucene.apache.org/solr/' | grep -oE '\\\d+\\\.\\\d+\\\.\\\d+'`}"
solr_version = ENV['BLACKLIGHT_SOLR_VERSION'] || `curl -s 'http://lucene.apache.org/solr/' | grep -oE '\\\d+\\\.\\\d+\\\.\\\d+' | tail -1 `.chomp
# rubocop:enable Style/SpaceInsidePercentLiteralDelimiters
options = {}
if solr_version.blank?
puts "Solr version was not specified and couldn't be retrieved: #{$CHILD_STATUS.exitstatus}"
else
options = { version: solr_version }
end
SolrWrapper.wrap(options) do |solr|
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path("..", File.dirname(__FILE__)), "solr", "conf")) do
within_test_app do
system "RAILS_ENV=test rake blacklight:index:seed"
Expand Down

0 comments on commit bd5bb11

Please sign in to comment.