From a58c90ace2505168eae6e1fa0fdd312f9ea088ae Mon Sep 17 00:00:00 2001
From: Paul Ilea <paul@sgalinski.de>
Date: Fri, 15 Feb 2019 17:30:31 +0200
Subject: [PATCH] [BUGFIX] Add handling for full solr ext version number

---
 providers/app.rb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/providers/app.rb b/providers/app.rb
index 3afa50e..5464c22 100644
--- a/providers/app.rb
+++ b/providers/app.rb
@@ -75,6 +75,10 @@ action :add do
 	end
 
 	# 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
 		user 'root'
 		timeout 3000000
@@ -82,8 +86,8 @@ action :add do
 
 		code <<-EOF
 			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/;
-			cp -a #{Chef::Config['file_cache_path']}/ext-solr-#{new_resource.extension}.0/Resources/Private/Solr/solr.xml server/solr/;
+			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-#{full_extension_version}/Resources/Private/Solr/solr.xml server/solr/;
 			chown solr:root -R #{node['typo3_solr']['solr']['solr_home']};
 		EOF
 	end
@@ -120,4 +124,4 @@ action :add do
 
 	# done
 	new_resource.updated_by_last_action(true)
-end
\ No newline at end of file
+end
-- 
GitLab