Commit a58c90ac authored by Paul Ilea's avatar Paul Ilea
Browse files

[BUGFIX] Add handling for full solr ext version number

parent 29f22046
Pipeline #37 failed with stages
...@@ -75,6 +75,10 @@ action :add do ...@@ -75,6 +75,10 @@ action :add do
end end
# Copy extension configuration to the final location # Copy extension configuration to the final location
full_extension_version = new_resource.extension
if full_extension_version.count('.') == 1
full_extension_version = full_extension_version + '.0'
end
bash 'Copy TYPO3 Solr configuration' do bash 'Copy TYPO3 Solr configuration' do
user 'root' user 'root'
timeout 3000000 timeout 3000000
...@@ -82,8 +86,8 @@ action :add do ...@@ -82,8 +86,8 @@ action :add do
code <<-EOF code <<-EOF
cd #{node['typo3_solr']['solr']['solr_home']}; cd #{node['typo3_solr']['solr']['solr_home']};
rm -rf server/solr/configsets/ && cp -a #{Chef::Config['file_cache_path']}/ext-solr-#{new_resource.extension}.0/Resources/Private/Solr/configsets server/solr/configsets/; rm -rf server/solr/configsets/ && cp -a #{Chef::Config['file_cache_path']}/ext-solr-#{full_extension_version}/Resources/Private/Solr/configsets server/solr/configsets/;
cp -a #{Chef::Config['file_cache_path']}/ext-solr-#{new_resource.extension}.0/Resources/Private/Solr/solr.xml server/solr/; cp -a #{Chef::Config['file_cache_path']}/ext-solr-#{full_extension_version}/Resources/Private/Solr/solr.xml server/solr/;
chown solr:root -R #{node['typo3_solr']['solr']['solr_home']}; chown solr:root -R #{node['typo3_solr']['solr']['solr_home']};
EOF EOF
end end
...@@ -120,4 +124,4 @@ action :add do ...@@ -120,4 +124,4 @@ action :add do
# done # done
new_resource.updated_by_last_action(true) new_resource.updated_by_last_action(true)
end end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment