-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.test.xml
127 lines (117 loc) · 5.02 KB
/
build.test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="UTF-8" ?>
<project name="My Subsite" default="help">
<!-- Install the subsite. -->
<target name="install" description="Install the subsite.">
<!--
Ensure the settings folder is writable so the installer can create
the settings.php file.
-->
<chmod mode="0755" failonerror="false" verbose="false" quiet="true">
<fileset dir="${platform.build.settings.dir}" />
</chmod>
<drush
command="site-install"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<option name="db-url" value="${drupal.db.url}" />
<option name="site-name" value="'${subsite.name}'" />
<option name="account-name" value="${drupal.admin.username}" />
<option name="account-pass" value="${drupal.admin.password}" />
<option name="account-mail" value="${drupal.admin.email}" />
<param>${platform.profile.name}</param>
</drush>
<!--
Subsites are not allowed to use their own installation profile for
historical reasons. The functionality is contained in one of more
features and modules which need to be enabled after installation.
-->
<phingcall target="enable-install-modules" />
</target>
<!-- Enable required modules after installation of the profile. -->
<target name="enable-install-modules">
<phingcall target="enable-modules">
<property name="drupal.modules" value="${subsite.install.modules}" />
</phingcall>
</target>
<!-- Enable development modules. -->
<target name="enable-development-modules">
<phingcall target="enable-modules">
<property name="drupal.modules" value="${drupal.development.modules}" />
</phingcall>
</target>
<!-- Enable modules. -->
<target name="enable-modules">
<drush
command="pm-enable"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<param>${drupal.modules}</param>
</drush>
</target>
<!-- Set up PHP CodeSniffer. -->
<target name="setup-php-codesniffer" description="Generate the configuration file for PHP CodeSniffer.">
<if>
<available file="${phpcs.config}" type="file" property="phpcs.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer default configuration file." />
<delete file="${phpcs.config}" failonerror="false" />
</then>
</if>
<if>
<available file="${phpcs.global.config}" type="file" property="phpcs.global.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer global configuration file." />
<delete file="${phpcs.global.config}" failonerror="false" />
</then>
</if>
<phpcodesnifferconfiguration
configFile="${phpcs.config}"
extensions="${phpcs.extensions}"
files="${phpcs.files}"
globalConfig="${phpcs.global.config}"
ignorePatterns="${phpcs.ignore}"
report="${phpcs.report}"
showProgress="${phpcs.progress}"
showSniffCodes="${phpcs.sniffcodes}"
standard="${phpcs.standard}" />
</target>
<!-- Set up Behat. -->
<target name="setup-behat">
<if>
<available file="${behat.yml.path}" type="file" property="behat.yml.available" />
<then>
<echo message="Deleting existing behat.yml configuration file" />
<delete file="${behat.yml.path}" failonerror="false" />
</then>
</if>
<echo message="Creating behat.yml configuration file" />
<loadfile property="behat.yml.content" file="${behat.yml.template}">
<filterchain>
<replacetokens>
<token key="project.code.dir" value="${project.code.dir}" />
<token key="drupal.site.dir" value="${drupal.site.dir}" />
<token key="behat.base_url" value="${behat.base_url}" />
<token key="behat.formatter.name" value="${behat.formatter.name}" />
</replacetokens>
</filterchain>
</loadfile>
<echo message="${behat.yml.content}" file="${behat.yml.path}" />
</target>
<!-- Run Behat tests. -->
<target name="behat" description="Run Behat tests.">
<behat
executable="${behat.bin}"
config="${behat.yml.path}"
strict="${behat.options.strict}"
verbose="${behat.options.verbosity}" />
</target>
<!-- Install a development version of the subsite. -->
<target
name="install-dev"
description="Install a local development version of the subsite."
depends="install, enable-development-modules" />
</project>