This repository was archived by the owner on Sep 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildAndDeploy.xml
More file actions
121 lines (109 loc) · 4.53 KB
/
buildAndDeploy.xml
File metadata and controls
121 lines (109 loc) · 4.53 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
<project name="Build and Deploy of Adoray Songserver" default="deployLocal">
<description>Different deployment and build tasks</description>
<!-- Load property file -->
<property file="buildAndDeploy.properties" />
<!-- The following properties can be overridden by buildAndDeploy.properties -->
<property name="sencha-exe" value="C:\Users\phili\bin\Sencha\Cmd\6.2.2.36\sencha.exe" />
<property name="buildMode" value="production" />
<property name="buildDir" value="build" />
<property name="environment" value="localBuild" />
<property name="zipFilename" value="zip.zip" />
<property name="zipLocation" value="${buildDir}/${zipFilename}" />
<target name="info">
<echo>This build file is designed to build and deploy the Songserver project locally or to docker.</echo>
<echo>The current build and deploy configuration is:</echo>
<echo>sencha-exe: ${sencha-exe}</echo>
<echo>buildDir: ${buildDir}</echo>
<echo>environment: ${environment}</echo>
</target>
<target name="cleanBuildFolder">
<echo>Deleting the build folder (${buildDir})...</echo>
<delete dir="${buildDir}" />
<echo>Creating the build folder structure (${buildDir})...</echo>
<mkdir dir="${buildDir}" />
<mkdir dir="${buildDir}/log" />
<mkdir dir="${buildDir}/all/resources" />
<mkdir dir="build/${buildMode}/Songserver/resources" />
</target>
<target name="buildForDocker" depends="deployLocal, stageDockerBuild">
<!--<target name="buildForDocker" depends="stageDockerBuild">-->
<echo>Build of ${environment} finished and ready of taking.</echo>
</target>
<target name="stageDockerBuild">
<copy todir="${buildDir}/dockerStage/www">
<fileset dir="${buildDir}/all" />
</copy>
</target>
<target name="deployLocal" depends="info, cleanBuildFolder, buildSenchaApp, build, overwriteBuildConfiguration">
<echo>Local deployment for ${environment} finished: ${buildDir}/all - http://localhost/adonai-database/${buildDir}/all/</echo>
</target>
<target name="build">
<echo>Creating build folder (${buildDir}/all)...</echo>
<echo>Copy ext-js part...</echo>
<copy todir="${buildDir}/all/resources">
<fileset dir="build/${buildMode}/Songserver/resources" />
</copy>
<copy todir="${buildDir}/all/content">
<fileset dir="content" />
</copy>
<copy todir="${buildDir}/all">
<fileset file="build/${buildMode}/Songserver/app.js" />
<fileset file="build/${buildMode}/Songserver/app.json" />
<fileset file="build/${buildMode}/Songserver/index.php" />
</copy>
<copy todir="${buildDir}/all">
<fileset file="build/${buildMode}/Songserver/app.json" />
</copy>
<copy todir="${buildDir}/all/resources">
<fileset file="build/${buildMode}/Songserver/resources/Songserver-all.css" />
</copy>
<echo>Scotty source files...</echo>
<copy todir="${buildDir}/all/src">
<fileset dir="src" />
</copy>
<copy todir="${buildDir}/all">
<fileset file="_index.html" />
<fileset file="faq.php" />
</copy>
<copy todir="${buildDir}/all/client">
<fileset dir="client" />
</copy>
<copy todir="${buildDir}/all/integration-testing">
<fileset dir="integration-testing" />
</copy>
<copy todir="${buildDir}/all/sfWeb">
<fileset dir="sfWeb" />
</copy>
</target>
<target name="overwriteBuildConfiguration" description="Overwrites the build with it's configuration so that we can test directly.">
<echo>Updating the local build with it's configuration (${environment})</echo>
<echo>Configuration source deploy/configurations/${environment}</echo>
<copy todir="${buildDir}/all" overwrite="true">
<fileset dir="deploy/configurations/${environment}" />
</copy>
</target>
<target name="buildSenchaApp" description="Builds the JS-Code">
<echo>Building Sencha App</echo>
<exec executable="${sencha-exe}">
<arg line="app build ${buildMode}" />
</exec>
</target>
<target name="enableMaintenance" description="Uploads a maintenance file.">
<echo>Uploading maintenance file to ${server}</echo>
<copy file="_index.html" tofile="index.html" />
<ftp server="${server}" userid="${serverUserId}" password="${serverPassword}" remotedir="" passive="yes" binary="no" verbose="yes">
<fileset dir=".">
<include name="index.html" />
</fileset>
</ftp>
<delete>
<fileset dir="." includes="index.html" />
</delete>
</target>
<target name="disableMaintenance" description="Deletes the maintenance files.">
<echo>Deleting maintenance files on ${server}</echo>
<ftp server="${server}" userid="${serverUserId}" password="${serverPassword}" verbose="yes" action="delete">
<fileset file="index.htm*" />
</ftp>
</target>
</project>