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

Commit 210d751

Browse files
KaiHarderKieranHayes
authored andcommitted
Add description for merge_configs tasks
Also adds documentation for task merge_config_in_base_path
1 parent 7ddb4c9 commit 210d751

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

rake/dkdeploy-typo3-cms/typoscript.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,50 @@ You would usually use this task during development and deployment:
9292
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.
9393
{% endhighlight %}
9494

95+
## merge\_configs
96+
97+
Merge remote, stage specific TypoScript configuration into a project-wide configuration file.
98+
99+
### Configuration
100+
101+
Here is an example for a multi-stage TypoScript configuration:
102+
103+
{% highlight ruby %}
104+
set :typoscript_config_paths, 'typo3conf/ext/customer_extension/Configuration/TypoScript/Config'
105+
{% endhighlight %}
106+
The configured path should have a `Stages` sub-directory with stage-specific configuration files.
107+
108+
Example: `customer_extension/Configuration/Typoscript/Config/Stages/config.#{fetch(:stage)}.txt`
109+
If this path or `config.#{fetch(:stage)}.txt` does not exist, the task will be skipped for this path.
110+
111+
A project-wide configuration file with the default filename `config.txt` is created, this name can be configured:
112+
113+
{% highlight ruby %}
114+
set :typoscript_config_file, 'filename.txt'
115+
{% endhighlight %}
116+
117+
### Usage
118+
119+
{% highlight shell-session %}
120+
cap <stage> typo3:cms:typoscript:merge_configs[:typoscript_config_paths,:typoscript_config_file]
121+
{% endhighlight %}
122+
This task is called by merge_config_in_base_path, so you may not need to call it yourself.
123+
124+
### Output
125+
{% highlight shell-session %}
126+
cap dev typo3:cms:typoscript:merge_configs["typo3conf/ext/dkdeploy/res/demo1/typoscript/constants typo3conf/ext/dkdeploy/res/demo2/typoscript/constants"]
127+
00:00 typo3:cms:typoscript:merge_configs
128+
01 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/config.txt
129+
✔ 01 vagrant@dkdeploy-typo3-cms.dev 0.007s
130+
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
131+
✔ 02 vagrant@dkdeploy-typo3-cms.dev 0.005s
132+
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.
133+
03 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/config.txt
134+
✔ 03 vagrant@dkdeploy-typo3-cms.dev 0.005s
135+
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
136+
✔ 04 vagrant@dkdeploy-typo3-cms.dev 0.005s
137+
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.
138+
{% endhighlight %}
95139

96140
## merge\_pagets
97141

@@ -106,3 +150,38 @@ TODO
106150
### Output
107151

108152
TODO
153+
154+
## merge\_config\_in\_base\_path
155+
156+
Merges all stage-specific remote config files in a given base path into a project-wide configuration file by calling `merge_configs`.
157+
158+
### Configuration
159+
160+
Variables:
161+
162+
{% highlight ruby %}
163+
:typoscript_config_base_path
164+
:typoscript_config_file
165+
{% endhighlight %}
166+
167+
The default for `:typoscript_config_file` is `config.txt`, but may be modified:
168+
169+
{% highlight ruby %}
170+
set :typoscript_config_file, 'filename.txt'
171+
{% endhighlight %}
172+
173+
The default for :typoscript_config_base_path` is .`, but may be modified:
174+
175+
{% highlight ruby %}
176+
set :typoscript_config_base_path, 'customer_extension'
177+
{% endhighlight %}
178+
179+
### Usage
180+
181+
{% highlight shell-session %}
182+
cap <stage> typo3:cms:typoscript:merge_config_in_base_path[:typoscript_config_base_path,:typoscript_config_file]
183+
{% endhighlight %}
184+
185+
### Output
186+
187+
TODO

0 commit comments

Comments
 (0)