-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-classic.xml
executable file
·107 lines (87 loc) · 3.65 KB
/
build-classic.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
<?xml version="1.0" encoding="UTF-8"?>
<project default="classic" basedir=".">
<description>
Build classic Extension - Compile
</description>
<!-- set global properties for this build -->
<import file="build-compile.xml"/>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- doc.json -->
<echo file="${dist}/classic/doc.json">
{
"builtDate":"${NOW}",
"version":"${bundleversion}${build.number}",
"id":"${id}",
"name":"${codename}",
"codename":"${codename}",
"label":"${label}",
"description":"${description}",
"type":"${installtype}",
"author":"${author}",
"category":"${category}"
}
</echo>
<!-- copy the jar just build -->
<copy todir="${dist}/extension/jars" failonerror="false">
<fileset dir="${temp}/jars/">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<exclude name="**/lucee.jar"/>
<exclude name="**/javax.servlet.jar"/>
<exclude name="**/slf4j-*.jar"/>
<exclude name="**/org-apache-oro-*.jar"/>
</fileset>
</copy>
<!-- copy the logos -->
<copy todir="${dist}/classic">
<fileset dir="${build}/images">
<include name="**/*.*"/>
</fileset>
</copy>
<!-- copy installer files -->
<copy todir="${dist}/extension/">
<fileset dir="${build}">
<include name="**/license.txt"/>
</fileset>
<fileset dir="${build}/images">
<include name="**/logo.png"/>
<include name="**/logo.gif"/>
<include name="**/logo.jpg"/>
</fileset>
</copy>
<loadfile property="content1" srcFile="${build}/Install.cfc" />
<replace haystack="${content1}" needle="{class}" repl="${class}" property="content2"/>
<replace haystack="${content2}" needle="{label}" repl="${label}" property="content3"/>
<replace haystack="${content3}" needle="{desc}" repl="${description}" property="content4"/>
<echo message="${content4}" file="${dist}/extension/Install.cfc"/>
<!-- add variables in config.xml -->
<loadfile property="content5" srcFile="${build}/config.xml" />
<replace haystack="${content5}" needle="{installtype}" repl="${installtype}" property="content6"/>
<replace haystack="${content6}" needle="{id}" repl="${id}" property="content7"/>
<replace haystack="${content7}" needle="{codename}" repl="${codename}" property="content8"/>
<replace haystack="${content8}" needle="{label}" repl="${label}" property="content9"/>
<replace haystack="${content9}" needle="{desc}" repl="${description}" property="content10"/>
<replace haystack="${content10}" needle="{version}" repl="${bundleversion}${build.number}" property="content11"/>
<replace haystack="${content11}" needle="{category}" repl="${category}" property="content12"/>
<replace haystack="${content12}" needle="{author}" repl="${author}" property="content13"/>
<replace haystack="${content13}" needle="{support}" repl="${support}" property="content14"/>
<replace haystack="${content14}" needle="{date}" repl="${NOW}" property="content15"/>
<echo message="${content15}" file="${dist}/extension/config.xml"/>
<!-- Zip everything -->
<zip destfile="${dist}/extension/thecode.zip">
<zipfileset dir="${tags}" erroronmissingdir="false"/>
<zipfileset dir="${functions}" erroronmissingdir="false"/>
<zipfileset dir="${plugins}" erroronmissingdir="false"/>
</zip>
<!-- Zip everything -->
<zip destfile="${dist}/classic/extension.zip">
<zipfileset dir="${dist}/extension"/>
</zip>
</target>
<target name="buildClassic" depends="dist" description="clean up" >
<delete dir="${dist}/extension"/>
</target>
</project>