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

Commit bf57753

Browse files
committed
Add description for merge_configs tasks
Also adds documentation for task merge_config_in_base_path
1 parent 8fcc07d commit bf57753

File tree

1 file changed

+69
-3
lines changed

1 file changed

+69
-3
lines changed

rake/dkdeploy-typo3-cms/typoscript.md

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,51 @@ TODO
6565

6666
## merge\_configs
6767

68+
Merge remote, stage specific TypoScript configuration into a project-wide configuration file.
69+
70+
### Configuration
71+
72+
Here is an example for a multi-stage TypoScript configuration:
73+
74+
{% highlight ruby %}
75+
set :typoscript_config_paths, 'typo3conf/ext/customer_extension/Configuration/TypoScript/Config'
76+
{% endhighlight %}
77+
The configured path should have a `Stages` sub-directory with stage-specific configuration files.
78+
79+
Example: `customer_extension/Configuration/Typoscript/Config/Stages/config.#{fetch(:stage)}.txt`
80+
If this path or `config.#{fetch(:stage)}.txt` does not exist, the task will be skipped for this path.
81+
82+
A project-wide configuration file with the default filename `config.txt` is created, this name can be configured:
83+
84+
{% highlight ruby %}
85+
set :typoscript_config_file, 'filename.txt'
86+
{% endhighlight %}
87+
88+
### Usage
89+
90+
{% highlight shell-session %}
91+
cap <stage> typo3:cms:typoscript:merge_configs[:typoscript_config_paths,:typoscript_config_file]
92+
{% endhighlight %}
93+
This task is called by merge_config_in_base_path, so you may not need to call it yourself.
94+
95+
### Output
96+
{% highlight shell-session %}
97+
cap dev typo3:cms:typoscript:merge_configs["typo3conf/ext/dkdeploy/res/demo1/typoscript/constants typo3conf/ext/dkdeploy/res/demo2/typoscript/constants"]
98+
00:00 typo3:cms:typoscript:merge_configs
99+
01 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo1/typoscript/constants/config.txt
100+
✔ 01 vagrant@dkdeploy-typo3-cms.dev 0.007s
101+
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
102+
✔ 02 vagrant@dkdeploy-typo3-cms.dev 0.005s
103+
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.
104+
03 echo '' >> /var/www/dkdeploy/current/typo3conf/ext/dkdeploy/res/demo2/typoscript/constants/config.txt
105+
✔ 03 vagrant@dkdeploy-typo3-cms.dev 0.005s
106+
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
107+
✔ 04 vagrant@dkdeploy-typo3-cms.dev 0.005s
108+
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.
109+
{% endhighlight %}
110+
111+
## merge\_pagets
112+
68113
### Configuration
69114

70115
TODO
@@ -77,15 +122,36 @@ TODO
77122

78123
TODO
79124

80-
## merge\_pagets
125+
## merge\_config\_in\_base\_path
126+
127+
Merges all stage-specific remote config files in a given base path into a project-wide configuration file by calling `merge_configs`.
81128

82129
### Configuration
83130

84-
TODO
131+
Variables:
132+
133+
{% highlight ruby %}
134+
:typoscript_config_base_path
135+
:typoscript_config_file
136+
{% endhighlight %}
137+
138+
The default for `:typoscript_config_file` is `config.txt`, but may be modified:
139+
140+
{% highlight ruby %}
141+
set :typoscript_config_file, 'filename.txt'
142+
{% endhighlight %}
143+
144+
The default for :typoscript_config_base_path` is .`, but may be modified:
145+
146+
{% highlight ruby %}
147+
set :typoscript_config_base_path, 'customer_extension'
148+
{% endhighlight %}
85149

86150
### Usage
87151

88-
TODO
152+
{% highlight shell-session %}
153+
cap <stage> typo3:cms:typoscript:merge_config_in_base_path[:typoscript_config_base_path,:typoscript_config_file]
154+
{% endhighlight %}
89155

90156
### Output
91157

0 commit comments

Comments
 (0)