-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
167 lines (143 loc) · 6 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
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
<project name="EbrcWebsiteCommon" basedir=".">
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooo Dependencies oooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<import file="${projectsDir}/WDK/build.xml" />
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooo Installation oooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<target name="EbrcWebsiteCommon-Installation" depends="WDK-Installation,
EbrcWebsiteCommon/Site-Installation,
EbrcWebsiteCommon/Model-Installation,
EbrcWebsiteCommon/View-Installation,
EbrcWebsiteCommon/Watar-Installation">
<ant target="defaultProjectInstall">
<property name="project" value="EbrcWebsiteCommon" />
</ant>
</target>
<!-- ooooooooooooooooooooooo Install Components ooooooooooooooooooooooo -->
<target name="EbrcWebsiteCommon/Model-Installation">
<ant target="defaultComponentInstall">
<property name="project" value="EbrcWebsiteCommon" />
<property name="component" value="Model" />
</ant>
</target>
<target name="EbrcWebsiteCommon/Site-Installation">
<ant target="defaultComponentInstall">
<property name="project" value="EbrcWebsiteCommon" />
<property name="component" value="Site" />
</ant>
</target>
<target name="EbrcWebsiteCommon/View-Installation">
<ant target="defaultComponentInstall">
<property name="project" value="EbrcWebsiteCommon" />
<property name="component" value="View" />
</ant>
</target>
<target name="EbrcWebsiteCommon/Watar-Installation">
<ant target="defaultComponentInstall">
<property name="project" value="EbrcWebsiteCommon" />
<property name="component" value="Watar" />
</ant>
</target>
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooo Web Installation oooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<target name="EbrcWebsiteCommon-WebInstallation" depends="WDK-WebInstallation,
EbrcWebsiteCommon-Installation,
EbrcWebsiteCommon/Site-WebInstallation"/>
<target name="EbrcWebsiteCommon/Site-WebInstallation">
<ant target="defaultWebComponentInstall">
<property name="project" value="EbrcWebsiteCommon" />
<property name="component" value="Site" />
</ant>
<ant target="webComponentPartCopy">
<property name="componentDir"
value="${projectsDir}/EbrcWebsiteCommon/Site" />
<property name="part" value="dashboard" />
<property name="to" value="${htdocsTargetDir}/../dashboard" />
</ant>
<available file="${htdocsTargetDir}/../dashboard" type="dir"
property="dashboard.present" />
<antcall target="dashboardDoc" />
<replace file="${cgibinTargetDir}/dataPlotter.pl"
token="@rProgram@"
value="${rProgram}" />
</target>
<target name="dashboardDoc" if="dashboard.present">
<echo message="Compiling phpdoc" />
<!-- errors to /dev/null due to Smarty bug: https://bugzilla.redhat.com/show_bug.cgi?id=1352882 -->
<exec executable="phpdoc"
failonerror="false"
failifexecutionfails="false"
error="/dev/null"
output="/dev/null"
>
<arg line="--ignore phpdoc/,css/,js/,config/,test/,images/,doc/" />
<arg line="--defaultpackagename dashboard" />
<arg line="--title /dashboard" />
<arg line="-t ${htdocsTargetDir}/../dashboard/phpdoc" />
<arg line="-d ${htdocsTargetDir}/../dashboard" />
<arg line="-o HTML:Smarty:PHP" />
<arg value="-q" />
</exec>
</target>
<!-- Targets used by component site builds -->
<target name="localBuildCheck">
<condition property="doLocalBuild">
<and>
<available file="${projectsDir}/web-monorepo" type="dir"/>
<not>
<and>
<isset property="webAssets.buildLocal"/>
<isfalse value="${webAssets.buildLocal}"/>
</and>
</not>
</and>
</condition>
</target>
<target name="localBuildWebAssets" depends="localBuildCheck" if="doLocalBuild">
<echo message="Building web assets locally"/>
<exec executable="yarn"
dir="${projectsDir}/web-monorepo"
failonerror="true"
failifexecutionfails="true"
/>
<exec executable="yarn"
dir="${projectsDir}/web-monorepo"
failonerror="true"
failifexecutionfails="true"
>
<arg line="nx bundle:dev @veupathdb/${sitePackageName}"/>
</exec>
<copy todir="${webappTargetDir}" overwrite="true">
<fileset
dir="${projectsDir}/web-monorepo/packages/sites/${sitePackageName}/dist"
excludes="bin"
/>
</copy>
<copy todir="${targetDir}/bin" overwrite="true">
<fileset
dir="${projectsDir}/web-monorepo/packages/sites/${sitePackageName}/dist/bin"
/>
</copy>
</target>
<target name="copyNpmAssets" depends="localBuildCheck" unless="doLocalBuild">
<echo message="Installing web assets from npm"/>
<copy todir="${webappTargetDir}" overwrite="true">
<fileset
dir="${projectsDir}/${project}/Site/node_modules/@veupathdb/${sitePackageName}/dist"
excludes="bin"
/>
</copy>
<copy todir="${targetDir}/bin" overwrite="true">
<fileset
dir="${projectsDir}/${project}/Site/node_modules/@veupathdb/${sitePackageName}/dist/bin"
/>
</copy>
</target>
<target name="installWebAssets">
<ant target="copyNpmAssets"/>
<ant target="localBuildWebAssets"/>
</target>
</project>