-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
190 lines (170 loc) · 6.89 KB
/
Copy pathbuild.xml
File metadata and controls
190 lines (170 loc) · 6.89 KB
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<project name="druphing" default="h">
<property name="druphing.loaded" value="true" />
<!-- For standalone Drupal Phing it should be current directory. -->
<property name="druphing.base_path" value="" />
<import file="${druphing.base_path}properties.xml" />
<taskdef name="drush" classpath="${druphing.base_path}build/phingdrushtask" classname="DrushTask"/>
<import file="${druphing.base_path}build/submodules/slack/build.xml" />
<import file="${druphing.base_path}build/submodules/drupal/build.xml" />
<import file="${druphing.base_path}build/submodules/repo/build.xml" />
<import file="${druphing.base_path}build/submodules/backup/build.xml" />
<import file="${druphing.base_path}build/submodules/restore/build.xml" />
<import file="${druphing.base_path}build/submodules/project/build.xml" />
<import file="${druphing.base_path}build/submodules/db/build.xml" />
<import file="${druphing.base_path}build/submodules/codesniffer/build.xml" />
<import file="${druphing.base_path}build/submodules/redis/build.xml" />
<import file="${druphing.base_path}build/submodules/phpmd/build.xml" />
<import file="${druphing.base_path}build/submodules/phpcpd/build.xml" />
<import file="${druphing.base_path}build/submodules/jmeter/build.xml" />
<if>
<not>
<isset property="server" />
</not>
<then>
<property name="server" value="${env.default.server}" />
</then>
</if>
<if>
<not>
<isset property="source" />
</not>
<then>
<property name="source" value="${env.default.source}" />
</then>
</if>
<!-- Build/rebuild whole site. -->
<target name="build" depends="drush-make, restore-settings-file, drushrc-file-copy, site-install" />
<target name="drush-make" depends="clear">
<echo msg="Drupal make run" />
<drush command="make" assume="yes">
<option name="root">${project.drupal.dir}</option>
<option name="uri">${project.drupal.uri}</option>
<param>${project.make.file}</param>
<param>${project.drupal.dir}</param>
</drush>
<phingcall target="add-permission" />
</target>
<target name="site-install" depends="db-drop, db-create, restore-custom-modules, restore-features-modules, restore-custom-themes, restore-project-files" description="Install site">
<echo msg="Project installation started" />
<phingcall target="drush-install" />
<phingcall target="switch-modules"/>
<phingcall target="add-permission" />
<phingcall target="patches-apply" />
<phingcall target="modules-enable">
<property name="projects.installable" value="${project.drupal.module.custom}" />
</phingcall>
<phingcall target="modules-enable">
<property name="projects.installable" value="${project.drupal.theme.custom}" />
</phingcall>
<phingcall target="install-default-theme" />
<phingcall target="cc" />
<phingcall target="modules-enable">
<property name="projects.installable" value="${project.drupal.module.settings}" />
</phingcall>
<phingcall target="restore-nodes" />
<echo msg="Project installation finished" />
</target>
<target name="drush-install">
<drush command="site-install" assume="yes">
<option name="root">${project.drupal.dir}</option>
<option name="uri">${project.drupal.uri}</option>
<option name="db-url">${env.db.driver}://${env.db.user}:${env.db.password}@${env.db.host}/${env.db.name}</option>
<option name="db-su">${env.db.user.sudo}</option>
<option name="db-su-pw">${env.db.user.sudo.password}</option>
<option name="account-name">${project.drupal.admin.name}</option>
<option name="account-pass">${project.drupal.admin.password}</option>
<option name="account-mail">${project.drupal.admin.mail}</option>
<option name="locale">${project.drupal.locale}</option>
<option name="clean-url">${project.drupal.clean_url}</option>
<option name="site-name">${project.drupal.site.name}</option>
<option name="site-mail">${project.drupal.site.mail}</option>
<param>standard</param>
</drush>
<echo msg="Drupal has been installed." />
</target>
<target name="drop" depends="clear, db-drop">
<echo msg="Project dir has been cleared and db has been dropped" />
</target>
<target name="clear">
<echo msg="Clear workspace" />
<if>
<available file="${project.drupal.dir}" property="dir_exists"/>
<then>
<phingcall target="add-permission" />
<delete dir="${project.drupal.dir}"/>
</then>
</if>
</target>
<target name="switch-modules" description="Enable and disable modules">
<phingcall target="modules-enable">
<property name="projects.installable" value="${project.drupal.module.standard}" />
</phingcall>
<phingcall target="modules-enable">
<property name="projects.installable" value="${project.drupal.module.contrib}" />
</phingcall>
<phingcall target="modules-disable">
<property name="projects.disable" value="${project.drupal.module.uninstall}" />
</phingcall>
<phingcall target="modules-uninstall">
<property name="projects.uninstall" value="${project.drupal.module.uninstall}" />
</phingcall>
</target>
<target name="project-up" description="Build project">
<phingcall target="restore-settings-file" />
<phingcall target="restore-robots-file" />
<phingcall target="drushrc-file-copy" />
<phingcall target="git-submodule-update" />
<if>
<and>
<isset property="source" />
<equals arg1="${source}" arg2="production" />
</and>
<then>
<phingcall target="db-restore-from-production" />
</then>
<else>
<if>
<and>
<isset property="source" />
<equals arg1="${source}" arg2="local" />
</and>
<then>
<phingcall target="db-restore-from-local" />
</then>
<else>
<phingcall target="db-restore-from-stage" />
</else>
</if>
</else>
</if>
<phingcall target="project-environment" />
<phingcall target="toggle-quick-login" />
<phingcall target="git-submodule-update" />
</target>
<!-- Short alias for project-up. -->
<target name="pu" depends="project-up" />
<!-- The same as project-up. -->
<target name="project-up-from-stage">
<phingcall target="project-up">
<property name="source" value="stage" />
</phingcall>
</target>
<target name="project-up-from-local">
<phingcall target="project-up">
<property name="source" value="local" />
</phingcall>
</target>
<target name="project-up-from-production">
<phingcall target="project-up">
<property name="source" value="production" />
</phingcall>
</target>
<target name="help">
<loadfile property="readme" file="README.txt" />
<echo msg="${readme}" />
</target>
<target name="h">
<loadfile property="readme" file="readme_short.txt" />
<echo msg="${readme}" />
</target>
</project>