-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
135 lines (97 loc) · 5.89 KB
/
build.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
128
129
130
131
132
133
134
135
<project name="slicklabs" default="build">
<!-- Run with: vendor/bin/phing -Dbuild.env=vagrant -->
<!-- For a list of commands, try: vendor/bin/phing -Dbuild.env=vagrant -l -->
<import file="vendor/palantirnet/the-build/tasks/boilerplate.xml" />
<!-- Make these commands available by default. -->
<import file="vendor/palantirnet/the-build/tasks/drupal.xml" />
<import file="vendor/palantirnet/the-build/tasks/acquia.xml" />
<!-- Default target: build -->
<target name="build" description="Build the application.">
<phingcall target="drupal-build" />
<!--<phingcall target="link-libraries" />-->
<property name="styleguide.dir" value="styleguide" />
<resolvepath propertyName="styleguide.dir.absolute_path" file="${styleguide.dir}" />
<resolvepath propertyname="styleguide_code" file="${styleguide.dir}/src/content/assets" />
<exec command="npm run butler -- sass" dir="${styleguide.dir.absolute_path}" logoutput="true" checkreturn="true" />
<resolvepath propertyname="custom_theme" file="${drupal.root}/themes/custom/slicklabs_theme" />
<includeresource mode="${build.artifact_mode}" source="${styleguide_code}/css" dest="${custom_theme}/css" />
<includeresource mode="${build.artifact_mode}" source="${styleguide_code}/js" dest="${custom_theme}/js" />
<includeresource mode="${build.artifact_mode}" source="${styleguide_code}/imgs" dest="${custom_theme}/imgs" />
</target>
<!-- Target: install -->
<target name="install" description="Install the application.">
<phingcall target="drupal-install" />
</target>
<!-- Target: migrate -->
<target name="migrate" description="Run the migrations.">
<echo>Configure this target to load sample data and run the migrations.</echo>
</target>
<!-- Target: load -->
<target name="load" description="Load the site from a db export.">
<property name="load.db_export_pattern" value="database-backup-*" />
<exec dir="${build.dir}" command="ls artifacts/${load.db_export_pattern}.sql | tail -1" outputProperty="load.db" />
<if>
<equals arg1="${load.db}" arg2="" />
<then>
<echo>Missing database export.
The setup task bootstraps your development environment from an Acquia database export. You need to download this from the Acquia UI and place it in your 'artifacts' directory:
artifacts/${load.db_export_pattern}database.sql.gz
Alternatively, you can specify the filename export pattern; to use exports from the Acquia 'test' environment, try:
vendor/bin/phing setup -Dload.db_export_pattern=test-uchicagoharris-uchicagoharrisstg-*
Or, you can specify the export files directly:
vendor/bin/phing setup -Dload.db=artifacts/my_db.sql.gz
</echo>
<fail message="Missing database export." />
</then>
</if>
<echo>Loading the `${load.db}` database...</echo>
<exec dir="${build.dir}" command="${load.db} | drush sqlc" checkreturn="true" logoutput="true" />
<drush command="sql-sanitize" assume="yes">
<option name="sanitize-email" value="user+%uid@localhost" />
<option name="sanitize-password" value="password" />
</drush>
<drush command="upwd">
<param>admin</param>
<option name="password" value="admin" />
</drush>
<echo>Importing config.</echo>
<drush command="cim" assume="yes">
<option name="source" value="/var/www/slicklabs.local/conf/drupal/config" />
</drush>
<!-- <drush command="updb" assume="yes" /> -->
<echo>Ok, check it out: ${drupal.uri}</echo>
</target>
<!-- Target: link-libraries -->
<target name="link-libraries">
<delete dir="${build.dir}/${drupal.root}/libraries/" />
<mkdir dir="${build.dir}/${drupal.root}/libraries/" />
<resolvepath propertyname="vendor_path" file="vendor" />
<includeresource mode="${build.artifact_mode}" source="${vendor_path}/desandro/imagesloaded" dest="${drupal.root}/libraries/imagesloaded" />
<includeresource mode="${build.artifact_mode}" source="${vendor_path}/desandro/masonry" dest="${drupal.root}/libraries/masonry" />
<includeresource mode="${build.artifact_mode}" source="${vendor_path}/enyo/dropzone" dest="${drupal.root}/libraries/dropzone" />
</target>
<!-- Target: test -->
<target name="test" description="Run all the tests.">
<echo>Configure this target to run the tests.</echo>
<!-- You may want to include one or more of the commands from the 'code-review' target here. -->
</target>
<!-- Target: code-review -->
<target name="code-review" description="Run the automated code reviews.">
<!-- These are called directly rather than using <import> because they are single-purpose task files. -->
<phing phingfile="${build.dir}/vendor/palantirnet/the-build/tasks/code_review/drupal_code_sniffer.xml" />
<phing phingfile="${build.dir}/vendor/palantirnet/the-build/tasks/code_review/phpmd.xml" />
<phing phingfile="${build.dir}/vendor/palantirnet/the-build/tasks/code_review/phplint.xml" />
<phing phingfile="${build.dir}/vendor/palantirnet/the-build/tasks/code_review/phptodo.xml" />
</target>
<!-- Target: deploy -->
<target name="deploy" description="Build and deploy the application.">
<echo>Configure this target to build the production artifact; see the `deploy-to-acquia` target for an example.</echo>
</target>
<!-- Target: deploy-to-acquia -->
<target name="deploy-to-acquia">
<phingcall target="check-deploy-env" />
<phingcall target="acquia-build" />
<phingcall target="build" />
<phingcall target="acquia-deploy" />
</target>
</project>