Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit 1a10ff3

Browse files
committed
Merge branch 'release/8.1.0'
* release/8.1.0: prepare release of v8.1.0 [TASK] use remote_web_root_path for path construction [BUGFIX] adjust user configuration in vm Adjust typo3 variable for TYPO3 8.7 compatibility Add support for typo3_console task "extension:setupactive" [CI] Test against Ruby 2.5
2 parents 849be20 + e02a109 commit 1a10ff3

File tree

15 files changed

+93
-53
lines changed

15 files changed

+93
-53
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ rvm:
55
- 2.2
66
- 2.3
77
- 2.4
8+
- 2.5
89

910
before_install:
1011
- gem install bundler --no-document

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

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+
614
## [8.0.0] - 2018-02-09
715
### Summary
816

@@ -26,5 +34,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2634
- first public release
2735

2836
[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
2938
[8.0.0]: https://github.com/dkdeploy/dkdeploy-typo3-cms/releases/tag/v8.0.0
3039
[7.0.0]: https://github.com/dkdeploy/dkdeploy-typo3-cms/releases/tag/v7.0.0

CONTRIBUTORS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
The dkdeploy core maintainers would like to recognize following contributors (in alphabetic order):
44

5+
- Jan Bergmann
6+
- Dimitri Ebert
57
- Sascha Egerer
68
- Christoph Gerold
79
- Johannes Goslar
10+
- Kai Harder
811
- Kieran Hayes
912
- Wilfried Irßlinger
1013
- Thomas Jahnke
1114
- Gleb Levitin
1215
- Luka Lüdicke
16+
- Minh-Thien Nhan
1317
- Nicolai Reuschling
1418
- Lars Tode
1519
- Timo Webler

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dkdeploy-typo3-cms ruby gem represents the extension of [Capistrano](http://capi
1313

1414
Add this line to your application's `Gemfile`
1515

16-
gem 'dkdeploy-typo3-cms', '~> 8.0'
16+
gem 'dkdeploy-typo3-cms', '~> 8.1'
1717

1818
and then execute
1919

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ unless Vagrant.has_plugin?('vagrant-berkshelf')
55
abort
66
end
77

8-
Vagrant.require_version '~> 2.0.0'
8+
Vagrant.require_version '~> 2.0'
99
chef_version = '12.9.41'
1010

1111
Vagrant.configure(2) do |config|

config/vm/cookbooks/dkdeploy-typo3-cms/recipes/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
group 'www-data' do
1616
action :create
1717
append true
18-
members 'ubuntu'
18+
members 'vagrant'
1919
end
2020

2121
# PHP

features/support/env.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ssh_key_files = Dir.glob(File.join(Dir.getwd, '.vagrant', 'machines', '**', 'virtualbox', 'private_key'))
55
unless ssh_key_files.empty?
66
# Define generated ssh key files
7-
ssh_config = { user: 'ubuntu', keys: ssh_key_files }
7+
ssh_config = { user: 'vagrant', keys: ssh_key_files }
88
end
99

1010
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('../../../', __FILE__), 'dkdeploy-typo3-cms.dev', ssh_config)

lib/dkdeploy/typo3/cms/helpers/cli.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Cli
1010
# @return [Boolean] returns true/false as success of execution
1111
def typo3_cli(*cli_params)
1212
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)
1414
end
1515

1616
# Execute a task typo3/cli_dispatch.phpsh cli_params in a specific directory
@@ -33,7 +33,7 @@ def typo3_cli_in_path(path, *cli_params)
3333
# @return [String] returns the last result of executing task
3434
def capture_typo3_cli_in_loop(maximum_loop_count, *cli_params, &block)
3535
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)
3737
end
3838

3939
# Returns the last results of invocations of a task typo3/cli_dispatch.phpsh cli_params
@@ -56,7 +56,7 @@ def capture_typo3_cli_in_path_in_loop(path, maximum_loop_count, *cli_params, &bl
5656
# @return [Boolean] returns true/false as success of execution
5757
def typo3_console(*cli_params)
5858
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)
6060
end
6161

6262
# Execute a typo3_console task with cli_params in a specific directory
@@ -79,7 +79,7 @@ def typo3_console_in_path(path, *cli_params)
7979
# @return [String] returns the last result of executing task
8080
def capture_typo3_console_in_loop(maximum_loop_count, *cli_params, &block)
8181
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)
8383
end
8484

8585
# Returns the last results of invocations of a typo3_console task with cli_params

lib/dkdeploy/typo3/cms/tasks/cache.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ namespace :typo3 do
55
namespace :cache do
66
desc 'Clear TYPO3 file cache directory'
77
task :clear_file_cache do |task|
8+
remote_web_root_path = fetch(:remote_web_root_path, '.')
9+
810
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'
1012
execute :rm, '-rf', cache_path if test "[ -d #{cache_path} ]"
1113
end
1214

lib/dkdeploy/typo3/cms/tasks/typo3.rake

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ namespace :typo3 do
2020
namespace :cms do
2121
desc 'Clear typo3temp directory'
2222
task :clear_typo3temp do
23+
remote_web_root_path = fetch(:remote_web_root_path, '.')
24+
2325
on release_roles :app do
2426
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', '*')
2628
end
2729
end
2830

2931
desc 'Disable TYPO3 install tool'
3032
task :disable_install_tool do
31-
flag = File.join(current_path, 'typo3conf', 'ENABLE_INSTALL_TOOL')
33+
remote_web_root_path = fetch(:remote_web_root_path, '.')
34+
flag = File.join(current_path, remote_web_root_path, 'typo3conf', 'ENABLE_INSTALL_TOOL')
3235

3336
on release_roles :app do
3437
if test "[ -f #{flag} ]"
@@ -40,10 +43,12 @@ namespace :typo3 do
4043

4144
desc 'Enable TYPO3 install tool'
4245
task :enable_install_tool do
46+
remote_web_root_path = fetch(:remote_web_root_path, '.')
47+
4348
on release_roles :app do
4449
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')
4752
end
4853
end
4954

@@ -78,14 +83,17 @@ namespace :typo3 do
7883

7984
desc 'Download extension to local workspace'
8085
task :fetch_extension, :extension do |_, args|
81-
extension = ask_variable(args, :extension, 'tasks.fetch_extension.extension_name')
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+
8290
FileUtils.mkdir_p File.join('temp', 'extensions')
8391
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)
8593
target = File.join('temp', 'extensions')
8694

8795
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)} ]"
8997
# download to temp
9098
info I18n.t('tasks.fetch_extension.download', extension: extension, scope: :dkdeploy)
9199
download! source, target, via: :scp, recursive: true
@@ -103,7 +111,7 @@ namespace :typo3 do
103111
rsync_exclude_directories.each do |exclude|
104112
rsync_excludes << '--exclude=' + exclude
105113
end
106-
execute :rsync, '-vrS', '--force', '-C', '--delete', rsync_excludes, File.join('temp', 'extensions', extension, '/'), File.join('htdocs', 'typo3conf', 'ext', extension, '/')
114+
execute :rsync, '-vrS', '--force', '-C', '--delete', rsync_excludes, File.join('temp', 'extensions', extension, '/'), File.join(local_web_root_path, 'typo3conf', 'ext', extension, '/')
107115
end
108116
end
109117

@@ -208,11 +216,10 @@ namespace :typo3 do
208216
end
209217
end
210218

211-
# Deactivate Task. Wait for https://github.com/TYPO3-Console/typo3_console/pull/288
212-
# desc 'add_static_db_content'
213-
# task :add_static_db_content do
214-
# typo3_console 'database:importstaticdata'
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
216223

217224
desc 'Update translations for core and extensions (l10n)'
218225
task :update_translations, :typo3_languages_to_translate do |_, args|
@@ -222,6 +229,7 @@ namespace :typo3 do
222229

223230
desc 'Remove not needed extensions'
224231
task :remove_extensions do
232+
remote_web_root_path = fetch(:remote_web_root_path, '.')
225233
installed_extensions = (capture_typo3_console_in_loop 1, 'extension:list', '--active', '--raw').split("\n")
226234

227235
run_locally do
@@ -233,13 +241,13 @@ namespace :typo3 do
233241

234242
on roles :app do
235243
# 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
237245

238246
extensions_to_remove = (remote_list - installed_extensions)
239247
unless extensions_to_remove.empty?
240248
info I18n.t('tasks.typo3.cms.v6.remove_extensions.info', scope: :dkdeploy, removed_extensions: extensions_to_remove.join(', '))
241249
extensions_to_remove.each do |extension|
242-
execute :rm, '-rf', "#{release_path}/typo3conf/ext/#{extension}"
250+
execute :rm, '-rf', File.join(release_path, remote_web_root_path, 'typo3conf/ext', extension)
243251
end
244252
end
245253
end
@@ -261,8 +269,9 @@ namespace :typo3 do
261269

262270
desc 'Sets up the TYPO3 6+ specific configuration for each stage'
263271
task :setup_additional_configuration, :additional_configuration_template do |_, args|
272+
remote_web_root_path = fetch(:remote_web_root_path, '.')
264273
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')
266275
unless File.exist?(configuration_template)
267276
run_locally do
268277
raise I18n.t('tasks.typo3.cms.v6.setup_additional_configuration.upload_info', configuration_template: configuration_template, scope: :dkdeploy)

0 commit comments

Comments
 (0)