dkdeploy-typo3-cms 8.0.0 → 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/CONTRIBUTORS.md +4 -0
- data/README.md +1 -1
- data/Vagrantfile +1 -1
- data/config/vm/cookbooks/dkdeploy-typo3-cms/recipes/default.rb +1 -1
- data/features/support/env.rb +1 -1
- data/lib/dkdeploy/typo3/cms/helpers/cli.rb +4 -4
- data/lib/dkdeploy/typo3/cms/tasks/cache.rake +3 -1
- data/lib/dkdeploy/typo3/cms/tasks/typo3.rake +25 -16
- data/lib/dkdeploy/typo3/cms/tasks/typoscript.rake +37 -22
- data/lib/dkdeploy/typo3/cms/version.rb +1 -1
- data/spec/fixtures/application/config/deploy/dev.rb +1 -1
- data/vendor/AdditionalConfiguration.php.erb +2 -2
- data/vendor/create_caretaker_instance_keys.php.erb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2efa618d6926181071595309ba8aa15c1b05ae2af7a381c36af6d9fdea1de110
|
4
|
+
data.tar.gz: ce9a5ffd61dde9d1f452c295f75508082127fc6a53a4f3ed2899624007beb719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76aaccb2fc2df6ffd38c3e1b134c965c305bea247e0e55af2549e4bbbb71bcd82ebfc7da0ba24f4f33c6ccc5b0aef61b8a3fb67ba4547060d6806ff505826108
|
7
|
+
data.tar.gz: d6fb48f97bde28ee4fd8112d1c02d5aaaf60464b588aa47f2a198af14a937324340d1422f80808c52bdc484cdcbba2a854e8d16f96060b8ad21f23ee7841ef13
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [8.1.0] - 2018-12-06
|
7
|
+
### Summary
|
8
|
+
|
9
|
+
- support for Ruby 2.5
|
10
|
+
- add support for typo3_console task "extension:setupactive"
|
11
|
+
- adjust typo3 variable for TYPO3 8.7 compatibility
|
12
|
+
- use remote_web_root_path for path construction
|
13
|
+
|
6
14
|
## [8.0.0] - 2018-02-09
|
7
15
|
### Summary
|
8
16
|
|
@@ -26,5 +34,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
26
34
|
- first public release
|
27
35
|
|
28
36
|
[Unreleased]: https://github.com/dkdeploy/dkdeploy-typo3-cms/compare/master...develop
|
37
|
+
[8.1.0]: https://github.com/dkdeploy/dkdeploy-typo3-cms/releases/tag/v8.1.0
|
29
38
|
[8.0.0]: https://github.com/dkdeploy/dkdeploy-typo3-cms/releases/tag/v8.0.0
|
30
39
|
[7.0.0]: https://github.com/dkdeploy/dkdeploy-typo3-cms/releases/tag/v7.0.0
|
data/CONTRIBUTORS.md
CHANGED
@@ -2,14 +2,18 @@
|
|
2
2
|
|
3
3
|
The dkdeploy core maintainers would like to recognize following contributors (in alphabetic order):
|
4
4
|
|
5
|
+
- Jan Bergmann
|
6
|
+
- Dimitri Ebert
|
5
7
|
- Sascha Egerer
|
6
8
|
- Christoph Gerold
|
7
9
|
- Johannes Goslar
|
10
|
+
- Kai Harder
|
8
11
|
- Kieran Hayes
|
9
12
|
- Wilfried Irßlinger
|
10
13
|
- Thomas Jahnke
|
11
14
|
- Gleb Levitin
|
12
15
|
- Luka Lüdicke
|
16
|
+
- Minh-Thien Nhan
|
13
17
|
- Nicolai Reuschling
|
14
18
|
- Lars Tode
|
15
19
|
- Timo Webler
|
data/README.md
CHANGED
data/Vagrantfile
CHANGED
data/features/support/env.rb
CHANGED
@@ -4,7 +4,7 @@ ssh_config = {}
|
|
4
4
|
ssh_key_files = Dir.glob(File.join(Dir.getwd, '.vagrant', 'machines', '**', 'virtualbox', 'private_key'))
|
5
5
|
unless ssh_key_files.empty?
|
6
6
|
# Define generated ssh key files
|
7
|
-
ssh_config = { user: '
|
7
|
+
ssh_config = { user: 'vagrant', keys: ssh_key_files }
|
8
8
|
end
|
9
9
|
|
10
10
|
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('../../../', __FILE__), 'dkdeploy-typo3-cms.dev', ssh_config)
|
@@ -10,7 +10,7 @@ module Dkdeploy
|
|
10
10
|
# @return [Boolean] returns true/false as success of execution
|
11
11
|
def typo3_cli(*cli_params)
|
12
12
|
path_to_cli_dispatch = File.join(current_path, fetch(:path_to_typo3_cli))
|
13
|
-
run_script(current_path, path_to_cli_dispatch, cli_params)
|
13
|
+
run_script(File.join(current_path), path_to_cli_dispatch, cli_params)
|
14
14
|
end
|
15
15
|
|
16
16
|
# Execute a task typo3/cli_dispatch.phpsh cli_params in a specific directory
|
@@ -33,7 +33,7 @@ module Dkdeploy
|
|
33
33
|
# @return [String] returns the last result of executing task
|
34
34
|
def capture_typo3_cli_in_loop(maximum_loop_count, *cli_params, &block)
|
35
35
|
path_to_cli_dispatch = File.join(current_path, fetch(:path_to_typo3_cli))
|
36
|
-
capture_script_in_loop(current_path, path_to_cli_dispatch, maximum_loop_count, cli_params, &block)
|
36
|
+
capture_script_in_loop(File.join(current_path), path_to_cli_dispatch, maximum_loop_count, cli_params, &block)
|
37
37
|
end
|
38
38
|
|
39
39
|
# Returns the last results of invocations of a task typo3/cli_dispatch.phpsh cli_params
|
@@ -56,7 +56,7 @@ module Dkdeploy
|
|
56
56
|
# @return [Boolean] returns true/false as success of execution
|
57
57
|
def typo3_console(*cli_params)
|
58
58
|
path_to_typo3_console = File.join(current_path, fetch(:path_to_typo3_console))
|
59
|
-
run_script(current_path, path_to_typo3_console, cli_params)
|
59
|
+
run_script(File.join(current_path), path_to_typo3_console, cli_params)
|
60
60
|
end
|
61
61
|
|
62
62
|
# Execute a typo3_console task with cli_params in a specific directory
|
@@ -79,7 +79,7 @@ module Dkdeploy
|
|
79
79
|
# @return [String] returns the last result of executing task
|
80
80
|
def capture_typo3_console_in_loop(maximum_loop_count, *cli_params, &block)
|
81
81
|
path_to_typo3_console = File.join(current_path, fetch(:path_to_typo3_console))
|
82
|
-
capture_script_in_loop(current_path, path_to_typo3_console, maximum_loop_count, cli_params, &block)
|
82
|
+
capture_script_in_loop(File.join(current_path), path_to_typo3_console, maximum_loop_count, cli_params, &block)
|
83
83
|
end
|
84
84
|
|
85
85
|
# Returns the last results of invocations of a typo3_console task with cli_params
|
@@ -5,8 +5,10 @@ namespace :typo3 do
|
|
5
5
|
namespace :cache do
|
6
6
|
desc 'Clear TYPO3 file cache directory'
|
7
7
|
task :clear_file_cache do |task|
|
8
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
9
|
+
|
8
10
|
on release_roles :app do
|
9
|
-
cache_path = File.join release_path, 'typo3temp', 'var', 'Cache'
|
11
|
+
cache_path = File.join release_path, remote_web_root_path, 'typo3temp', 'var', 'Cache'
|
10
12
|
execute :rm, '-rf', cache_path if test "[ -d #{cache_path} ]"
|
11
13
|
end
|
12
14
|
|
@@ -20,15 +20,18 @@ namespace :typo3 do
|
|
20
20
|
namespace :cms do
|
21
21
|
desc 'Clear typo3temp directory'
|
22
22
|
task :clear_typo3temp do
|
23
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
24
|
+
|
23
25
|
on release_roles :app do
|
24
26
|
info I18n.t('tasks.clear_temp.clear', scope: :dkdeploy)
|
25
|
-
execute :rm, '-rf', File.join(release_path, 'typo3temp', '*')
|
27
|
+
execute :rm, '-rf', File.join(release_path, remote_web_root_path, 'typo3temp', '*')
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
31
|
desc 'Disable TYPO3 install tool'
|
30
32
|
task :disable_install_tool do
|
31
|
-
|
33
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
34
|
+
flag = File.join(current_path, remote_web_root_path, 'typo3conf', 'ENABLE_INSTALL_TOOL')
|
32
35
|
|
33
36
|
on release_roles :app do
|
34
37
|
if test "[ -f #{flag} ]"
|
@@ -40,10 +43,12 @@ namespace :typo3 do
|
|
40
43
|
|
41
44
|
desc 'Enable TYPO3 install tool'
|
42
45
|
task :enable_install_tool do
|
46
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
47
|
+
|
43
48
|
on release_roles :app do
|
44
49
|
info I18n.t('tasks.install_tool.enable', scope: :dkdeploy)
|
45
|
-
execute :mkdir, '-p', File.join(current_path, 'typo3conf')
|
46
|
-
execute :touch, File.join(current_path, 'typo3conf', 'ENABLE_INSTALL_TOOL')
|
50
|
+
execute :mkdir, '-p', File.join(current_path, remote_web_root_path, 'typo3conf')
|
51
|
+
execute :touch, File.join(current_path, remote_web_root_path, 'typo3conf', 'ENABLE_INSTALL_TOOL')
|
47
52
|
end
|
48
53
|
end
|
49
54
|
|
@@ -78,14 +83,17 @@ namespace :typo3 do
|
|
78
83
|
|
79
84
|
desc 'Download extension to local workspace'
|
80
85
|
task :fetch_extension, :extension do |_, args|
|
81
|
-
|
86
|
+
local_web_root_path = ask_array_variable(args, :local_web_root_path, 'questions.local_web_root_path')
|
87
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
88
|
+
extension = ask_variable(args, :extension, 'tasks.fetch_extension.extension_name')
|
89
|
+
|
82
90
|
FileUtils.mkdir_p File.join('temp', 'extensions')
|
83
91
|
FileUtils.remove_dir File.join('temp', 'extensions', extension), true
|
84
|
-
source = File.join(current_path, 'typo3conf', 'ext', extension)
|
92
|
+
source = File.join(current_path, remote_web_root_path, 'typo3conf', 'ext', extension)
|
85
93
|
target = File.join('temp', 'extensions')
|
86
94
|
|
87
95
|
on primary(:backend) do
|
88
|
-
if test "[ -d #{File.join(current_path, 'typo3conf', 'ext', extension)} ]"
|
96
|
+
if test "[ -d #{File.join(current_path, remote_web_root_path, 'typo3conf', 'ext', extension)} ]"
|
89
97
|
# download to temp
|
90
98
|
info I18n.t('tasks.fetch_extension.download', extension: extension, scope: :dkdeploy)
|
91
99
|
download! source, target, via: :scp, recursive: true
|
@@ -103,7 +111,7 @@ namespace :typo3 do
|
|
103
111
|
rsync_exclude_directories.each do |exclude|
|
104
112
|
rsync_excludes << '--exclude=' + exclude
|
105
113
|
end
|
106
|
-
execute :rsync, '-vrS', '--force', '-C', '--delete', rsync_excludes, File.join('temp', 'extensions', extension, '/'), File.join(
|
114
|
+
execute :rsync, '-vrS', '--force', '-C', '--delete', rsync_excludes, File.join('temp', 'extensions', extension, '/'), File.join(local_web_root_path, 'typo3conf', 'ext', extension, '/')
|
107
115
|
end
|
108
116
|
end
|
109
117
|
|
@@ -208,11 +216,10 @@ namespace :typo3 do
|
|
208
216
|
end
|
209
217
|
end
|
210
218
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
# end
|
219
|
+
desc 'Task to import static extension data into TYPO3'
|
220
|
+
task :setup_active_extensions do
|
221
|
+
typo3_console 'extension:setupactive', '--verbose'
|
222
|
+
end
|
216
223
|
|
217
224
|
desc 'Update translations for core and extensions (l10n)'
|
218
225
|
task :update_translations, :typo3_languages_to_translate do |_, args|
|
@@ -222,6 +229,7 @@ namespace :typo3 do
|
|
222
229
|
|
223
230
|
desc 'Remove not needed extensions'
|
224
231
|
task :remove_extensions do
|
232
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
225
233
|
installed_extensions = (capture_typo3_console_in_loop 1, 'extension:list', '--active', '--raw').split("\n")
|
226
234
|
|
227
235
|
run_locally do
|
@@ -233,13 +241,13 @@ namespace :typo3 do
|
|
233
241
|
|
234
242
|
on roles :app do
|
235
243
|
# Get extensions from typo3conf/ext directory
|
236
|
-
remote_list = capture(:ls, '-x', File.join(current_path, 'typo3conf', 'ext')).split
|
244
|
+
remote_list = capture(:ls, '-x', File.join(current_path, remote_web_root_path, 'typo3conf', 'ext')).split
|
237
245
|
|
238
246
|
extensions_to_remove = (remote_list - installed_extensions)
|
239
247
|
unless extensions_to_remove.empty?
|
240
248
|
info I18n.t('tasks.typo3.cms.v6.remove_extensions.info', scope: :dkdeploy, removed_extensions: extensions_to_remove.join(', '))
|
241
249
|
extensions_to_remove.each do |extension|
|
242
|
-
execute :rm, '-rf',
|
250
|
+
execute :rm, '-rf', File.join(release_path, remote_web_root_path, 'typo3conf/ext', extension)
|
243
251
|
end
|
244
252
|
end
|
245
253
|
end
|
@@ -261,8 +269,9 @@ namespace :typo3 do
|
|
261
269
|
|
262
270
|
desc 'Sets up the TYPO3 6+ specific configuration for each stage'
|
263
271
|
task :setup_additional_configuration, :additional_configuration_template do |_, args|
|
272
|
+
remote_web_root_path = fetch(:remote_web_root_path, '.')
|
264
273
|
configuration_template = ask_variable(args, :additional_configuration_template, 'questions.additional_configuration_template')
|
265
|
-
remote_configuration_file = File.join(release_path, 'typo3conf', 'AdditionalConfiguration.php')
|
274
|
+
remote_configuration_file = File.join(release_path, remote_web_root_path, 'typo3conf', 'AdditionalConfiguration.php')
|
266
275
|
unless File.exist?(configuration_template)
|
267
276
|
run_locally do
|
268
277
|
raise I18n.t('tasks.typo3.cms.v6.setup_additional_configuration.upload_info', configuration_template: configuration_template, scope: :dkdeploy)
|
@@ -10,13 +10,14 @@ namespace :typo3 do
|
|
10
10
|
desc "Uploads TypoScript config files from local paths prefixed by variable 'copy_source'"
|
11
11
|
task :upload_configs, :copy_source, :typoscript_config_paths, :typoscript_config_file do |_, args|
|
12
12
|
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
13
|
+
remote = fetch(:remote_web_root_path, '.')
|
13
14
|
paths = ask_array_variable(args, :typoscript_config_paths, 'tasks.typoscript.config_paths') { |question| question.default = '' }
|
14
15
|
config_file = ask_variable(args, :typoscript_config_file, 'tasks.typoscript.config_file') { |question| question.default = 'config.txt' }
|
15
16
|
|
16
17
|
paths.each do |path|
|
17
18
|
local_path = File.join(prefix, path)
|
18
19
|
local_config_file = File.join(local_path, config_file)
|
19
|
-
remote_path = File.join(current_path, path)
|
20
|
+
remote_path = File.join(current_path, remote, path)
|
20
21
|
remote_config_file = File.join(remote_path, config_file)
|
21
22
|
|
22
23
|
unless File.exist? local_config_file
|
@@ -38,13 +39,14 @@ namespace :typo3 do
|
|
38
39
|
desc "Uploads PageTS files from local paths prefixed by variable 'copy_source'"
|
39
40
|
task :upload_pagets, :copy_source, :typoscript_pagets_paths, :typoscript_pagets_file do |_, args|
|
40
41
|
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
42
|
+
remote = fetch(:remote_web_root_path, '.')
|
41
43
|
paths = ask_array_variable(args, :typoscript_pagets_paths, 'tasks.typoscript.pagets_paths') { |question| question.default = '' }
|
42
44
|
pagets_file = ask_variable(args, :typoscript_pagets_file, 'tasks.typoscript.pagets_file') { |question| question.default = 'PageTS.txt' }
|
43
45
|
|
44
46
|
paths.each do |path|
|
45
47
|
local_path = File.join(prefix, path)
|
46
48
|
local_pagets_file = File.join(local_path, pagets_file)
|
47
|
-
remote_path = File.join(current_path, path)
|
49
|
+
remote_path = File.join(current_path, remote, path)
|
48
50
|
remote_pagets_file = File.join(remote_path, pagets_file)
|
49
51
|
|
50
52
|
unless File.exist? local_pagets_file
|
@@ -66,13 +68,14 @@ namespace :typo3 do
|
|
66
68
|
desc "Uploads UserTS files from local paths prefixed by variable 'copy_source'"
|
67
69
|
task :upload_userts, :copy_source, :typoscript_userts_paths, :typoscript_userts_file do |_, args|
|
68
70
|
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
71
|
+
remote = fetch(:remote_web_root_path, '.')
|
69
72
|
paths = ask_array_variable(args, :typoscript_userts_paths, 'tasks.typoscript.userts_paths') { |question| question.default = '' }
|
70
73
|
userts_file = ask_variable(args, :typoscript_userts_file, 'tasks.typoscript.userts_file') { |question| question.default = 'UserTS.txt' }
|
71
74
|
|
72
75
|
paths.each do |path|
|
73
76
|
local_path = File.join(prefix, path)
|
74
77
|
local_userts_file = File.join(local_path, userts_file)
|
75
|
-
remote_path = File.join(current_path, path)
|
78
|
+
remote_path = File.join(current_path, remote, path)
|
76
79
|
remote_userts_file = File.join(remote_path, userts_file)
|
77
80
|
|
78
81
|
unless File.exist? local_userts_file
|
@@ -93,8 +96,9 @@ namespace :typo3 do
|
|
93
96
|
|
94
97
|
desc 'Uploads all config files from given base path'
|
95
98
|
task :upload_config_from_base_path, :copy_source, :typoscript_config_base_path, :typoscript_config_file do |_, args|
|
96
|
-
prefix
|
97
|
-
|
99
|
+
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
100
|
+
remote = fetch(:remote_web_root_path, '.')
|
101
|
+
base_path = ask_variable(args, :typoscript_config_base_path, 'tasks.typoscript.typoscript_config_base_path') { |question| question.default = '.' }
|
98
102
|
config_file = ask_variable(args, :typoscript_config_file, 'tasks.typoscript.config_file') { |question| question.default = 'config.txt' }
|
99
103
|
|
100
104
|
config_files = Dir[File.join(prefix, base_path, '**', config_file).to_s].map { |path_for_config_file| Pathname.new(path_for_config_file).relative_path_from(Pathname.new(prefix)).dirname.to_s }
|
@@ -102,6 +106,7 @@ namespace :typo3 do
|
|
102
106
|
next if config_files.empty?
|
103
107
|
|
104
108
|
set :copy_source, prefix
|
109
|
+
set :remote_web_root_path, remote
|
105
110
|
set :typoscript_config_paths, config_files
|
106
111
|
set :typoscript_config_file, config_file
|
107
112
|
invoke 'typo3:cms:typoscript:upload_configs'
|
@@ -109,14 +114,16 @@ namespace :typo3 do
|
|
109
114
|
|
110
115
|
desc 'Uploads all PageTS files from given base path'
|
111
116
|
task :upload_pagets_from_base_path, :copy_source, :typoscript_pagets_base_path, :typoscript_pagets_file do |_, args|
|
112
|
-
prefix
|
113
|
-
|
117
|
+
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
118
|
+
remote = fetch(:remote_web_root_path, '.')
|
119
|
+
base_path = ask_variable(args, :typoscript_pagets_base_path, 'tasks.typoscript.typoscript_pagets_base_path') { |question| question.default = '.' }
|
114
120
|
pagets_file = ask_variable(args, :typoscript_pagets_file, 'tasks.typoscript.pagets_file') { |question| question.default = 'PageTS.txt' }
|
115
121
|
|
116
122
|
pagets_files = Dir[File.join(prefix, base_path, '**', pagets_file).to_s].map { |path_for_pagets_file| Pathname.new(path_for_pagets_file).relative_path_from(Pathname.new(prefix)).dirname.to_s }
|
117
123
|
next if pagets_files.empty?
|
118
124
|
|
119
125
|
set :copy_source, prefix
|
126
|
+
set :remote_web_root_path, remote
|
120
127
|
set :typoscript_pagets_paths, pagets_files
|
121
128
|
set :typoscript_pagets_file, pagets_file
|
122
129
|
invoke 'typo3:cms:typoscript:upload_pagets'
|
@@ -124,14 +131,16 @@ namespace :typo3 do
|
|
124
131
|
|
125
132
|
desc 'Uploads all UserTS files from given base path'
|
126
133
|
task 'upload_userts_from_base_path', :copy_source, :typoscript_userts_base_path, :typoscript_userts_file do |_, args|
|
127
|
-
prefix
|
128
|
-
|
134
|
+
prefix = ask_variable(args, :copy_source, 'tasks.typoscript.copy_source') { |question| question.default = 'htdocs' }
|
135
|
+
remote = fetch(:remote_web_root_path, '.')
|
136
|
+
base_path = ask_variable(args, :typoscript_userts_base_path, 'tasks.typoscript.typoscript_userts_base_path') { |question| question.default = '.' }
|
129
137
|
userts_file = ask_variable(args, :typoscript_userts_file, 'tasks.typoscript.userts_file') { |question| question.default = 'UserTS.txt' }
|
130
138
|
|
131
139
|
userts_files = Dir[File.join(prefix, base_path, '**', userts_file).to_s].map { |path_for_userts_file| Pathname.new(path_for_userts_file).relative_path_from(Pathname.new(prefix)).dirname.to_s }
|
132
140
|
next if userts_files.empty?
|
133
141
|
|
134
142
|
set :copy_source, prefix
|
143
|
+
set :remote_web_root_path, remote
|
135
144
|
set :typoscript_userts_paths, userts_files
|
136
145
|
set :typoscript_userts_file, userts_file
|
137
146
|
invoke 'typo3:cms:typoscript:upload_userts'
|
@@ -139,11 +148,12 @@ namespace :typo3 do
|
|
139
148
|
|
140
149
|
desc 'Merge remote TypoScript config files'
|
141
150
|
task :merge_configs, :typoscript_config_paths, :typoscript_config_file do |_, args|
|
142
|
-
|
151
|
+
remote = fetch(:remote_web_root_path, '.')
|
152
|
+
paths = ask_array_variable(args, :typoscript_config_paths, 'tasks.typoscript.config_paths')
|
143
153
|
config_file = ask_variable(args, :typoscript_config_file, 'tasks.typoscript.config_file') { |question| question.default = 'config.txt' }
|
144
154
|
|
145
155
|
paths.each do |path|
|
146
|
-
path = File.join(release_path, path)
|
156
|
+
path = File.join(release_path, remote, path)
|
147
157
|
|
148
158
|
target_config_file_with_stage_name = config_file.split('.').join(".#{fetch(:stage)}.")
|
149
159
|
source_config_file = File.join(path, 'Stages', target_config_file_with_stage_name)
|
@@ -169,11 +179,12 @@ namespace :typo3 do
|
|
169
179
|
|
170
180
|
desc 'Merge remote PageTS files'
|
171
181
|
task :merge_pagets, :typoscript_pagets_paths, :typoscript_pagets_file do |_, args|
|
172
|
-
|
182
|
+
remote = fetch(:remote_web_root_path, '.')
|
183
|
+
paths = ask_array_variable(args, :typoscript_pagets_paths, 'tasks.typoscript.pagets_paths')
|
173
184
|
pagets_file = ask_variable(args, :typoscript_pagets_file, 'tasks.typoscript.pagets_file') { |question| question.default = 'PageTS.txt' }
|
174
185
|
|
175
186
|
paths.each do |path|
|
176
|
-
path = File.join(release_path, path)
|
187
|
+
path = File.join(release_path, remote, path)
|
177
188
|
|
178
189
|
target_pagets_file_with_stage_name = pagets_file.split('.').join(".#{fetch(:stage)}.")
|
179
190
|
source_pagets_file = File.join(path, 'Stages', target_pagets_file_with_stage_name)
|
@@ -199,11 +210,12 @@ namespace :typo3 do
|
|
199
210
|
|
200
211
|
desc 'Merge remote UserTS files'
|
201
212
|
task :merge_userts, :typoscript_userts_paths, :typoscript_userts_file do |_, args|
|
202
|
-
|
213
|
+
remote = fetch(:remote_web_root_path, '.')
|
214
|
+
paths = ask_array_variable(args, :typoscript_userts_paths, 'tasks.typoscript.userts_paths')
|
203
215
|
userts_file = ask_variable(args, :typoscript_userts_file, 'tasks.typoscript.userts_file') { |question| question.default = 'UserTS.txt' }
|
204
216
|
|
205
217
|
paths.each do |path|
|
206
|
-
path = File.join(release_path, path)
|
218
|
+
path = File.join(release_path, remote, path)
|
207
219
|
|
208
220
|
target_userts_file_with_stage_name = userts_file.split('.').join(".#{fetch(:stage)}.")
|
209
221
|
source_userts_file = File.join(path, 'Stages', target_userts_file_with_stage_name)
|
@@ -229,13 +241,14 @@ namespace :typo3 do
|
|
229
241
|
|
230
242
|
desc 'Merge all remote config files for a given base path'
|
231
243
|
task :merge_config_in_base_path, :typoscript_config_base_path, :typoscript_config_file do |_, args|
|
232
|
-
|
244
|
+
remote = fetch(:remote_web_root_path, '.')
|
245
|
+
base_path = ask_variable(args, :typoscript_config_base_path, 'tasks.typoscript.typoscript_config_base_path') { |question| question.default = '.' }
|
233
246
|
config_file = ask_variable(args, :typoscript_config_file, 'tasks.typoscript.config_file') { |question| question.default = 'config.txt' }
|
234
247
|
|
235
248
|
list_of_files = ''
|
236
249
|
target_config_file_with_stage_name = config_file.split('.').join(".#{fetch(:stage)}.")
|
237
250
|
on primary :app do
|
238
|
-
list_of_files = capture :find, File.join(release_path, base_path), '-type f', "-name '#{target_config_file_with_stage_name}'"
|
251
|
+
list_of_files = capture :find, File.join(release_path, remote, base_path), '-type f', "-name '#{target_config_file_with_stage_name}'"
|
239
252
|
end
|
240
253
|
|
241
254
|
next if list_of_files.empty?
|
@@ -248,13 +261,14 @@ namespace :typo3 do
|
|
248
261
|
|
249
262
|
desc 'Merge all remote PageTS files for a given base path'
|
250
263
|
task :merge_pagets_in_base_path, :typoscript_pagets_base_path, :typoscript_pagets_file do |_, args|
|
251
|
-
|
264
|
+
remote = fetch(:remote_web_root_path, '.')
|
265
|
+
base_path = ask_variable(args, :typoscript_pagets_base_path, 'tasks.typoscript.typoscript_pagets_base_path') { |question| question.default = '.' }
|
252
266
|
pagets_file = ask_variable(args, :typoscript_pagets_file, 'tasks.typoscript.pagets_file') { |question| question.default = 'PageTS.txt' }
|
253
267
|
|
254
268
|
list_of_files = ''
|
255
269
|
target_pagets_file_with_stage_name = pagets_file.split('.').join(".#{fetch(:stage)}.")
|
256
270
|
on primary :app do
|
257
|
-
list_of_files = capture :find, File.join(release_path, base_path), '-type f', "-name '#{target_pagets_file_with_stage_name}'"
|
271
|
+
list_of_files = capture :find, File.join(release_path, remote, base_path), '-type f', "-name '#{target_pagets_file_with_stage_name}'"
|
258
272
|
end
|
259
273
|
|
260
274
|
next if list_of_files.empty?
|
@@ -267,17 +281,18 @@ namespace :typo3 do
|
|
267
281
|
|
268
282
|
desc 'Merge all remote UserTS files for a given bbase path'
|
269
283
|
task :merge_userts_in_base_path, :typoscript_userts_base_path, :typoscript_userts_file do |_, args|
|
270
|
-
|
284
|
+
remote = fetch(:remote_web_root_path, '.')
|
285
|
+
base_path = ask_variable(args, :typoscript_userts_base_path, 'tasks.typoscript.typoscript_userts_base_path') { |question| question.default = '.' }
|
271
286
|
userts_file = ask_variable(args, :typoscript_userts_file, 'tasks.typoscript.userts_file') { |question| question.default = 'UserTS.txt' }
|
272
287
|
|
273
288
|
list_of_files = ''
|
274
289
|
target_userts_file_with_stage_name = userts_file.split('.').join(".#{fetch(:stage)}.")
|
275
290
|
on primary :app do
|
276
|
-
list_of_files = capture :find, File.join(release_path, base_path), '-type f', "-name '#{target_userts_file_with_stage_name}'"
|
291
|
+
list_of_files = capture :find, File.join(release_path, remote, base_path), '-type f', "-name '#{target_userts_file_with_stage_name}'"
|
277
292
|
end
|
278
293
|
|
279
294
|
next if list_of_files.empty?
|
280
|
-
userts_files = list_of_files.split.map { |file| Pathname.new(file).relative_path_from(Pathname.new(release_path)).dirname.dirname.to_s }
|
295
|
+
userts_files = list_of_files.split.map { |file| Pathname.new(file).relative_path_from(Pathname.new(release_path) + remote).dirname.dirname.to_s }
|
281
296
|
|
282
297
|
set :typoscript_userts_paths, userts_files
|
283
298
|
set :typoscript_userts_file, userts_file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<?php
|
2
|
-
<% if File.exist?(File.join(
|
2
|
+
<% if File.exist?(File.join(fetch(:local_web_root_path), 'typo3conf', 'AdditionalConfiguration.php')) %>
|
3
3
|
// Content of default configuration file
|
4
|
-
<%= sanitize_php File.read(File.join(
|
4
|
+
<%= sanitize_php File.read(File.join(fetch(:local_web_root_path), 'typo3conf', 'AdditionalConfiguration.php')) %>
|
5
5
|
<% end %>
|
6
6
|
<% if File.exist?(File.join('config', 'typo3', "AdditionalConfiguration.#{fetch(:stage)}.php")) %>
|
7
7
|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
$handle = fopen('<%= fetch(:caretaker_instance_keys_path) %>', 'w');
|
4
4
|
fwrite($handle, "<?php
|
5
|
-
\$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance'] = serialize(
|
5
|
+
\$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker_instance'] = serialize(
|
6
6
|
array_replace_recursive(
|
7
|
-
unserialize(\$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance']),
|
7
|
+
unserialize(\$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker_instance']),
|
8
8
|
array (
|
9
9
|
'crypto.' => array(
|
10
10
|
'instance.' => array(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dkdeploy-typo3-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kieran Hayes
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-12-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
|
-
rubygems_version: 2.7.
|
234
|
+
rubygems_version: 2.7.8
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: dkd TYPO3 deployment tasks and strategies
|