typo3:cms:typoscript
upload_configs
Uploads TypoScript config files from local paths prefixed by variable copy_source.
Configuration
Here is an example for a multistage setup.
set :typoscript_config_paths, 'typo3conf/ext/customer_extension/typoscript/config/'Let’s say you want a stage-specific config.txt, then you use the stage variable when you set your config file name:
set :typoscript_config_file, "config.#{fetch(:stage)}.text"Usage
You would usually use this task during development with a tool like Guard:
# Make sure configs are being uploaded before being merged
when %r{(Configuration/TypoScript/Constants/Stages/config\.dev\.txt|Configuration/TypoScript/Constants/config\.txt)}
# upload and merge config.txt
system 'cap dev typo3:cms:typoscript:upload_configs'
system 'cap dev typo3:cms:typoscript:merge_configs'Output
00:00 typo3:cms:typoscript:upload_configs
01 mkdir -p /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants
✔ 01 vagrant@192.168.156.14 4.011s
Uploading htdocs/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants/config.txt to /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants/config.txt...
Uploading htdocs/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants/config.txt 100.0%
Uploaded htdocs/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants/config.txt to /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkd_customer/Configuration/TypoScript/Constants/config.txt.upload_
Uploads PageTS files from local paths prefixed by variable copy_source.
Configuration
Here is an example for a multistage pagets.
set :typoscript_pagets_paths, 'typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf'For a stage specific file name set the variable like this:
set :typoscript_pagets_file, 'PageTS.#{fetch(:stage)}.txt' If the parent folder from typoscript_pagets_paths on your local environment differ from htdocs then it must
be configured:
set :copy_source, 'custom_htdocs_folder' Usage
You would usually use this task during development and deployment:
cap <stage> typo3:cms:typoscript:upload_pagetsOutput
00:00 typo3:cms:typoscript:upload_pagets
01 mkdir -p /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf
✔ 01 vagrant@192.168.156.14 4.011s
Uploading htdocs/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt to /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkd_customer/Configuration/TypoScript/TSConf/PageTS.txt...
Uploading htdocs/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt 100.0%
Uploaded htdocs/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt to /var/www/typo3-cms-standard/htdocs/current/typo3conf/ext/dkd_customer/Configuration/TypoScript/TSConf/PageTS.txt.merge_configs
Merge remote, stage specific TypoScript configuration into a project-wide configuration file.
Configuration
Here is an example for a multi-stage TypoScript configuration:
set :typoscript_config_paths, 'typo3conf/ext/customer_extension/Configuration/TypoScript/Config'The configured path should have a Stages sub-directory with stage-specific configuration files.
Example:
customer_extension/Configuration/Typoscript/Config/Stages/config.#{fetch(:stage)}.txtIf this path or config.#{fetch(:stage)}.txt does not exist, the task will be skipped for this path.
A project-wide configuration file with the default filename config.txt is created, this name can be configured:
set :typoscript_config_file, 'filename.txt'Usage
cap <stage> typo3:cms:typoscript:merge_configs[:typoscript_config_paths,:typoscript_config_file]
This task is called by merge_config_in_base_path, so you may not need to call it yourself.
Output
cap dev typo3:cms:typoscript:merge_configs["typo3conf/ext/dkdeploy/res/demo1/typoscript/constants typo3conf/ext/dkdeploy/res/demo2/typoscript/constants"]
00:00 typo3:cms:typoscript:merge_configs
01 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/config.txt
✔ 01 vagrant@dkdeploy-typo3-cms.dev 0.007s
02 cat /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/Stages/config.dev.txt >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/config.txt
✔ 02 vagrant@dkdeploy-typo3-cms.dev 0.005s
Merged /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/Stages/config.dev.txt with /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/config.txt.
03 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/config.txt
✔ 03 vagrant@dkdeploy-typo3-cms.dev 0.005s
04 cat /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/Stages/config.dev.txt >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/config.txt
✔ 04 vagrant@dkdeploy-typo3-cms.dev 0.005s
Merged /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/Stages/config.dev.txt with /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/config.txt.merge_pagets
Configuration
TODO
Usage
TODO
Output
TODO
merge_config_in_base_path
Merges all stage-specific remote config files in a given base path into a project-wide configuration file by calling merge_configs.
Merge remote stage specific PageTS file into project-wide PageTS file.
Configuration
Here is an example for a multistage PageTs:
set :typoscript_pagets_paths, 'typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf'The configured paths should have a Stages sub-directory with stage specific PageTs files.
Example:
dkdeploy_extension/Configuration/TypoScript/TSConf/Stages/PageTS.<StageName>.txtIf path or PageTS.<StageName>.txt does not exists, task will be skipped for this path.
And a project-wide PageTS file with a default filename PageTS.txt.
You can configure your own filename:
set :typoscript_pagets_file, 'filename.txt' If project-wide PageTS does not exists, it will be created.
Usage
You would usually use this task during development and deployment:
cap <stage> typo3:cms:typoscript:merge_pagetsIt is recommended to upload pagets before:
cap <stage> typo3:cms:typoscript:upload_pagetsVariables:
:typoscript_config_base_path
:typoscript_config_fileThe default for :typoscript_config_file is config.txt, but may be modified:
set :typoscript_config_file, 'filename.txt'The default for :typoscript_config_base_path is \., but may be modified:
set :typoscript_config_base_path, 'customer_extension'Usage
cap <stage> typo3:cms:typoscript:merge_config_in_base_path[:typoscript_config_base_path,:typoscript_config_file]Output
cap dev typo3:cms:typoscript:merge_pagets["typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf"]
00:00 typo3:cms:typoscript:merge_pagets
01 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt
✔ 01 vagrant@dkdeploy-typo3-cms.dev 0.005s
02 cat /var/www/dkdeploy/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/Stages/PageTS.dev.txt >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt
✔ 02 vagrant@dkdeploy-typo3-cms.dev 0.005s
Merged /var/www/dkdeploy/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/Stages/PageTS.dev.txt with /var/www/dkdeploy/current/typo3conf/ext/dkdeploy_extension/Configuration/TypoScript/TSConf/PageTS.txt.