Skip to content

Commit

Permalink
#1125 Use archive URL for old SOLR versions
Browse files Browse the repository at this point in the history
  • Loading branch information
j3nsch committed Oct 26, 2023
1 parent 3e22b0c commit a0a6564
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/bin/install_solr_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@ while [ $# -gt 0 ]; do
shift
done

SOLR_VERSION="$version"

# Download Solr version
if [[ "$version" =~ ^[1-8]\.[0-9]+\.[0-9]+$ ]]; then
SOLR_VERSION="$version"
ant download-solr -DsolrVersion=$SOLR_VERSION -DdownloadDir=./downloads
SOLR_URL="https://archive.apache.org/dist/lucene/solr/${solrVersion}/solr-${solrVersion}.tgz"
elif [[ "$version" =~ ^(9|[1-9][0-9]+)\.[0-9]+\.[0-9]+$ ]]; then # new archive URL for versions >9.0.0
SOLR_VERSION="$version"
SOLR_URL="https://www.apache.org/dyn/closer.lua/solr/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz?action=download"
echo "Getting: $SOLR_URL"
wget -q $SOLR_URL -O - | tar -xz
else
echo "Unrecognized version number"
echo -e "The --version option requires a 3-digit version number, e.g.: 9.4.0"
exit 1
fi

echo "Getting: $SOLR_URL"
wget -q $SOLR_URL -O - | tar -xz

# Configure & start Solr
cd solr-$SOLR_VERSION
./bin/solr start -force
Expand Down

0 comments on commit a0a6564

Please sign in to comment.