forked from JamesFowler42/morpheuz20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
110 lines (101 loc) · 4.73 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
<?xml version="1.0"?>
<project name="morpheuz" basedir="." default="all">
<property name="ver" value="32"/>
<property name="inc" value="28"/>
<property name="builddir" value="website/morpheuz/build"/>
<property name="srcdir" value="website/morpheuz"/>
<property name="test.dir" value="../Desktop/morpheuz"/>
<property name="img" value="/img"/>
<target name="all" description="all">
<antcall target="shrink" inheritrefs="true" inheritall="true">
<param name="in.file" value="view.css" />
<param name="min.file" value="view-${ver}.min.css" />
</antcall>
<antcall target="shrink" inheritrefs="true" inheritall="true">
<param name="in.file" value="view.js" />
<param name="min.file" value="view-${ver}.min.js" />
</antcall>
<antcall target="shrink" inheritrefs="true" inheritall="true">
<param name="in.file" value="utils.js" />
<param name="min.file" value="utils-${ver}.min.js" />
</antcall>
<antcall target="copyedit" inheritrefs="true" inheritall="true">
<param name="in.file" value="view.html" />
<param name="out.file" value="view-${ver}.html" />
</antcall>
<antcall target="copyversion" inheritrefs="true" inheritall="true">
<param name="in.file" value="currentversion.json" />
<param name="out.file" value="currentversion.json" />
</antcall>
<antcall target="copyquote" inheritrefs="true" inheritall="true">
<param name="in.file" value="quotes.json" />
<param name="out.file" value="quotes.json" />
</antcall>
<antcall target="copyquote" inheritrefs="true" inheritall="true">
<param name="in.file" value="json_email.php" />
<param name="out.file" value="json_email.php" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="view-${ver}.min.css" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="view-${ver}.min.js" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="utils-${ver}.min.js" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="view-${ver}.html" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="currentversion.json" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="quotes.json" />
</antcall>
<antcall target="copy" inheritrefs="true" inheritall="true">
<param name="min.file" value="json_email.php" />
</antcall>
<antcall target="copyimages" inheritrefs="true" inheritall="true" />
</target>
<target name="shrink" description="shrink">
<delete file="${builddir}/${min.file}"/>
<echo message="Minifying ${srcdir}/${in.file} to ${builddir}/${min.file}"/>
<java jar="../yui/yuicompressor-2.4.8.jar" fork="true">
<arg value="${srcdir}/${in.file}" />
<arg value="-o" />
<arg value="${builddir}/${min.file}" />
<classpath>
<pathelement location="../yui/yuicompressor-2.4.8.jar" />
</classpath>
</java>
</target>
<target name="copy" description="copy">
<echo message="Copying ${builddir}/${min.file} to ${test.dir}/${min.file}"/>
<copy file="${builddir}/${min.file}" tofile="${test.dir}/${min.file}" overwrite="true" force="true" />
</target>
<target name="copyedit" description="copyedit">
<echo message="Copying ${srcdir}/${in.file} to ${builddir}/${out.file}"/>
<copy file="${srcdir}/${in.file}" tofile="${builddir}/${out.file}" overwrite="true" force="true" />
<echo message="Editing ${builddir}/${out.file}"/>
<replace file="${builddir}/${out.file}" token="view.js?v=1" value="view-${ver}.min.js?v=${inc}"/>
<replace file="${builddir}/${out.file}" token="view.css?v=1" value="view-${ver}.min.css?v=${inc}"/>
<replace file="${builddir}/${out.file}" token="utils.js?v=1" value="utils-${ver}.min.js?v=${inc}"/>
</target>
<target name="copyversion" description="copyversion">
<echo message="Copying ${srcdir}/${in.file} to ${builddir}/${out.file}"/>
<copy file="${srcdir}/${in.file}" tofile="${builddir}/${out.file}" overwrite="true" force="true" />
<echo message="Editing ${builddir}/${out.file}"/>
<replace file="${builddir}/${out.file}" token="@@@" value="${ver}"/>
</target>
<target name="copyquote" description="copyquote">
<echo message="Copying ${srcdir}/${in.file} to ${builddir}/${out.file}"/>
<copy file="${srcdir}/${in.file}" tofile="${builddir}/${out.file}" overwrite="true" force="true" outputencoding="US-ASCII"/>
</target>
<target name="copyimages" description="copyimages">
<echo message="Copying images from ${srcdir}${img} to ${test.dir}${img}"/>
<copy todir="${test.dir}${img}" overwrite="true" force="true">
<fileset dir="${srcdir}${img}"/>
</copy>
</target>
</project>