forked from mfu/mfu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackaging-demo.xml
104 lines (88 loc) · 5.49 KB
/
packaging-demo.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
<project name="packaging-demo" basedir=".">
<target name="mfu-prod-demo-init">
<delete dir="${mfu-demo.target.dir}"/>
<mkdir dir="${mfu-demo.target.dir}" />
</target>
<!-- START FOR PACKAGING DEMO COPY -->
<target name="mfu-dojo-embedded-copy-demo" depends="package">
<copy todir="${mfu-demo.samples.dir}/${mfude}/dojo/nls" overwrite="true">
<fileset dir="${dojo.dir}/release/${mfude}/dojo/nls"></fileset>
</copy>
<copy file="${dojo.dir}/release/${mfude}/dojo/dojo.js" todir="${mfu-demo.samples.dir}/${mfude}/dojo"/>
<copy file="${dojo.dir}/release/${mfude}/dojo/dojo.js.uncompressed.js" todir="${mfu-demo.samples.dir}/${mfude}/dojo"/>
<copy file="./src/samples/${mfude}.html" todir="${mfu-demo.samples.dir}/${mfude}/"/>
</target>
<target name="php-copy-demo">
<copy todir="${mfu-demo.samples.dir}/php" overwrite="true">
<fileset dir="./src/samples/php"></fileset>
</copy>
</target>
<target name="some-dijit-files-copy-demo">
<copy file="${dojo.dir}/dijit/themes/a11y/indeterminate_progress.gif" todir="${mfu-demo.samples.dir}/${mfuiddd}/dijit/themes/a11y"/>
<copy file="${dojo.dir}/dijit/themes/a11y/indeterminate_progress.gif" todir="${mfu-demo.samples.dir}/${mfude}/dijit/themes/a11y"/>
</target>
<target name="mfu-including-dijit-dojox-dependencies-copy-demo" depends="package">
<copy todir="${mfu-demo.samples.dir}/${mfuiddd}/layers/nls" overwrite="true">
<fileset dir="${dojo.dir}/release/${mfuiddd}/layers/nls"></fileset>
</copy>
<copy file="${dojo.dir}/release/${mfuiddd}/layers/mfu.js" todir="${mfu-demo.samples.dir}/${mfuiddd}/layers"/>
<copy file="${dojo.dir}/release/${mfuiddd}/layers/mfu.js.uncompressed.js" todir="${mfu-demo.samples.dir}/${mfuiddd}/layers"/>
<copy file="${dojo.dir}/release/${mfuiddd}/dojo/dojo.js" todir="${mfu-demo.samples.dir}/${mfuiddd}/dojo"/>
<copy file="${dojo.dir}/release/${mfuiddd}/dojo/dojo.js.uncompressed.js" todir="${mfu-demo.samples.dir}/${mfuiddd}/dojo"/>
<copy file="./src/samples/${mfuiddd}.html" todir="${mfu-demo.samples.dir}/${mfuiddd}/"/>
</target>
<target name="mfu-src-copy-demo">
<copy todir="${mfu-demo.target.dir}/src/multiplefileuploader" overwrite="true">
<fileset dir="./src/multiplefileuploader">
<include name="**/*"/>
</fileset>
</copy>
<copy file="./src/samples/mfu-src.html" todir="${mfu-demo.samples.dir}/src"/>
</target>
<target name="dojo-copy-demo">
<copy todir="${mfu-demo.target.dir}/${dojo.version}" overwrite="true">
<fileset dir="${dojo.dir}" excludes="release/**"/>
</copy>
</target>
<target name="pymager-conf-copy-demo">
<copy file="./src/samples/mfudemo/pymagerConf.js" todir="${mfu-demo.samples.dir}/mfudemo/"/>
</target>
<target name="replace-dojo-version-samples-demo" description="Replacing variable">
<replace file="${mfu-demo.samples.dir}/${mfude}/${mfude}.html" token="@DOJO_VERSION@" value="${dojo.version}"/>
<replace file="${mfu-demo.samples.dir}/${mfuiddd}/${mfuiddd}.html" token="@DOJO_VERSION@" value="${dojo.version}"/>
<replace file="${mfu-demo.samples.dir}/src/mfu-src.html" token="@DOJO_VERSION@" value="${dojo.version}"/>
<replace file="${mfu-demo.target.dir}/src/multiplefileuploader/resources/FileInput.css" token="@DOJO_VERSION@" value="${dojo.version}"/>
</target>
<target name="replace-upload-conf-demo" description="Replacing variable">
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@PYMAGER_HOST@" value="${production.pymager.host}"/>
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@PYMAGER_PORT@" value="${production.pymager.port}"/>
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@PYMAGER_PATH@" value="${production.pymager.path}"/>
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@UPLOAD_TO@" value="${production.pymager.uploadTo}"/>
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@PYMAGER_USERNAME@" value="${production.pymager.username}"/>
<replace file="${mfu-demo.samples.dir}/php/upload.conf" token="@PYMAGER_PASSWORD@" value="${production.pymager.password}"/>
<replace file="${mfu-demo.samples.dir}/mfudemo/pymagerConf.js" token="@PYMAGER_HOST@" value="${production.pymager.host}"/>
<replace file="${mfu-demo.samples.dir}/mfudemo/pymagerConf.js" token="@PYMAGER_PORT@" value="${production.pymager.port}"/>
<replace file="${mfu-demo.samples.dir}/mfudemo/pymagerConf.js" token="@PYMAGER_PATH@" value="${production.pymager.path}"/>
</target>
<target name="tar-release-demo">
<tar destfile="${target.dir}/mfu-demo.tar" basedir="${mfu-demo.target.dir}"/>
<gzip destfile="${target.dir}/mfu-demo.tar.gz" src="${target.dir}/mfu-demo.tar"/>
<delete file="${target.dir}/mfu-demo.tar" />
</target>
<target name="demo:deploy" depends="demo">
<sshexec host="${site.host}"
username="${site.user}"
password="${site.password}"
command="mkdir -p ${mfu-demo.remote.dir}"
/>
<scp file="${target.dir}/mfu-demo.tar.gz" todir="${site.user}:${site.password}@${site.host}:${mfu-demo.remote.dir}" verbose="true">
</scp>
<!--
<sshexec host="${site.host}"
username="${site.user}"
password="${site.password}"
command="cd ${mfu.remote.dir} ; tar -zvxf mfu-${mfu.version}.tar.gz"
/> -->
</target>
<!-- END OF PACKAGING COPY-->
</project>