forked from spocke/punymce
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
97 lines (83 loc) · 4.93 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="PunyMCE" default="build" basedir=".">
<!-- Path properties -->
<property description="Export directory" name="export_dir" value="export" />
<!-- Setup classpath for js-build-tools ant tasks -->
<path id="tasks.classpath">
<pathelement location="."/>
<fileset dir="tools\ant">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Register new js-build-tools ant tasks -->
<taskdef name="preprocess" classname="com.moxiecode.ant.tasks.PreProcessTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="yuicompress" classname="com.moxiecode.ant.tasks.YuiCompressTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="moxiedoc" classname="com.moxiecode.ant.tasks.MoxieDocTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<!-- Generate JS documentation -->
<target name="moxiedoc" depends="" description="Generates HTML documentation out of js source">
<delete quiet="true">
<fileset dir="docs/api" includes="**/*"/>
</delete>
<moxiedoc outdir="docs/api" templatedir="tools/templates" msintellisense="docs/api/punymce.vsdoc.js" eventclass="punymce.Dispatcher" title="PunyMCE API">
<fileset dir="js/punymce">
<include name="**/puny_mce_src.js" />
</fileset>
</moxiedoc>
</target>
<target name="build">
<!-- Concat multuple JS files together -->
<concat destfile="js/punymce/puny_mce.full.tmp.js">
<fileset dir="js" includes="punymce/puny_mce_src.js" />
<fileset dir="js" includes="punymce/plugins/**/*_src.js" />
</concat>
<!-- Compress PunyMCE full and base using the YUI Compressor -->
<yuicompress infile="js/punymce/puny_mce.full.tmp.js" outfile="js/punymce/puny_mce_full.js" />
<yuicompress infile="js/punymce/puny_mce_src.js" outfile="js/punymce/puny_mce.js" />
<!-- Compress all PunyMCE plugins using the YUI Compressor -->
<yuicompress infile="js/punymce/plugins/bbcode_src.js" outfile="js/punymce/plugins/bbcode.js" />
<yuicompress infile="js/punymce/plugins/editsource/editsource_src.js" outfile="js/punymce/plugins/editsource/editsource.js" />
<yuicompress infile="js/punymce/plugins/emoticons/emoticons_src.js" outfile="js/punymce/plugins/emoticons/emoticons.js" />
<yuicompress infile="js/punymce/plugins/entities_src.js" outfile="js/punymce/plugins/entities.js" />
<yuicompress infile="js/punymce/plugins/forceblocks_src.js" outfile="js/punymce/plugins/forceblocks.js" />
<yuicompress infile="js/punymce/plugins/forcenl_src.js" outfile="js/punymce/plugins/forcenl.js" />
<yuicompress infile="js/punymce/plugins/image/image_src.js" outfile="js/punymce/plugins/image/image.js" />
<yuicompress infile="js/punymce/plugins/link/link_src.js" outfile="js/punymce/plugins/link/link.js" />
<yuicompress infile="js/punymce/plugins/paste_src.js" outfile="js/punymce/plugins/paste.js" />
<yuicompress infile="js/punymce/plugins/protect_src.js" outfile="js/punymce/plugins/protect.js" />
<yuicompress infile="js/punymce/plugins/safari2x_src.js" outfile="js/punymce/plugins/safari2x.js" />
<yuicompress infile="js/punymce/plugins/tabfocus_src.js" outfile="js/punymce/plugins/tabfocus.js" />
<yuicompress infile="js/punymce/plugins/textcolor/textcolor_src.js" outfile="js/punymce/plugins/textcolor/textcolor.js" />
<delete file="js/punymce/puny_mce.full.tmp.js" quiet="true" />
</target>
<target name="release">
<!-- Export -->
<delete dir="${export_dir}/punymce" quiet="true" />
<svn javahl="${javahl}">
<export srcUrl="http://punymce.googlecode.com/svn/trunk/" destPath="${export_dir}/punymce" />
</svn>
<!-- Parse minor version, major version and release date from changelog -->
<loadfile property="changelog" srcFile="${export_dir}/punymce/changelog.txt" />
<propertyregex property="version" input="${changelog}" regexp="^Version ([0-9xabrc.]+)" select="\1" />
<propertyregex property="release_date" input="${changelog}" regexp="^Version [^\(]+\(([^\)]+)\)" select="\1" />
<propertyregex property="file_version" input="${version}" regexp="\." replace="_" />
<!-- Compress production package -->
<delete file="${export_dir}/punymce_${file_version}.zip" quiet="true" />
<zip destfile="${export_dir}/punymce_${file_version}.zip">
<fileset dir="${export_dir}/punymce">
<include name="*/**" />
<exclude name="tools/**" />
<exclude name="build.xml" />
<exclude name="build.bat" />
</fileset>
</zip>
<!-- Compress dev package -->
<delete file="${export_dir}/punymce_${file_version}_dev.zip" quiet="true" />
<zip destfile="${export_dir}/punymce_${file_version}_dev.zip">
<fileset dir="${export_dir}/punymce">
<include name="*/**" />
</fileset>
</zip>
</target>
</project>