forked from ec-europa/joinup-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.config.xml
54 lines (47 loc) · 2.41 KB
/
build.config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Config management" default="help">
<target
name="setup-config-sync-dir"
description="Sets the config sync dir to '${drupal.config.dir}'"
depends="writable-settings-folder, writable-settings-php">
<reflexive>
<fileset dir="${website.settings.dir}">
<include pattern="settings.php" />
</fileset>
<filterchain>
<replaceregexp>
<!-- Remove deprecated global variable. See https://www.drupal.org/node/3018145. -->
<regexp
pattern="^\s*\$config_directories\s*\[\s*('sync'|\"sync\"|CONFIG_SYNC_DIRECTORY)\s*\].*$\n"
replace=""
modifiers="m" />
<!-- Remove existing $settings['config_sync_directory'] setting -->
<regexp
pattern="^\s*\$settings\s*\[\s*('config_sync_directory'|\"config_sync_directory\")\s*\].*$\n"
replace=""
modifiers="m" />
</replaceregexp>
</filterchain>
</reflexive>
<append destFile="${website.settings.php}" text="${line.separator}$settings['config_sync_directory'] = '${drupal.config.dir}';${line.separator}" />
</target>
<target name="setup-config-exclude" depends="writable-settings-folder, writable-settings-local-php">
<!-- Remove previous configuration. -->
<reflexive>
<fileset dir="${website.settings.dir}">
<include pattern="settings.local.php" />
</fileset>
<filterchain>
<replaceregexp>
<regexp
pattern="^\s*\$settings\s*\[\s*('config_exclude_modules'|\"config_exclude_modules\")\s*\].*$\n"
replace=""
modifiers="m" />
</replaceregexp>
</filterchain>
</reflexive>
<!-- Rebuild the settings. -->
<php expression="'["' . implode('", "', preg_split('/\s+/', trim('${drupal.modules.dev}'))) . '"]'" returnProperty="modules.dev"/>
<append destFile="${website.settings.local.php}" text="$settings['config_exclude_modules'] = ${modules.dev};${line.separator}"/>
</target>
</project>