Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 87a49e296d
Fetching contributors…

Cannot retrieve contributors at this time

98 lines (82 sloc) 4.213 kB
<?xml version="1.0" encoding="UTF-8"?>
<project name="TinyMCE" default="all" basedir=".">
<property description="Temp directory" name="temp_dir" value="tmp" />
<property description="Compressor type" name="type" value="php" />
<!-- 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 resource="net/sf/antcontrib/antcontrib.properties" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<!-- Cleanup the build -->
<target name="clean" depends="" description="Cleans up the project from temporary files">
<delete dir="${temp_dir}" quiet="true" />
</target>
<target name="build" depends="" description="Creates a release package">
<!-- Copy the current repos and start processing it -->
<delete dir="${temp_dir}/tinymce_compressor_${type}" quiet="true" />
<copy todir="${temp_dir}/tinymce_compressor_${type}">
<fileset dir=".">
<include name="tiny_mce_gzip.${ext}"/>
<include name="tiny_mce_gzip.js"/>
<include name="changelog_${type}.txt"/>
</fileset>
</copy>
<!-- Replace the default page with build extension -->
<replaceregexp match="tiny_mce_gzip\.php" replace="tiny_mce_gzip.${ext}" flags="g" byline="true">
<fileset dir="${temp_dir}/tinymce_compressor_${type}">
<include name="tiny_mce_gzip.js" />
</fileset>
</replaceregexp>
<!-- Parse minor version, major version and release date from changelog -->
<loadfile property="changelog" srcFile="${temp_dir}/tinymce_compressor_${type}/changelog_${type}.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="_" />
<move file="${temp_dir}/tinymce_compressor_${type}/changelog_${type}.txt" tofile="${temp_dir}/tinymce_compressor_${type}/changelog.txt" overwrite="true" />
<echo file="${temp_dir}/tinymce_compressor_${type}/readme.txt" append="false">More information about how to use and install this compressor can be found at the TinyMCE Web Site at: http://tinymce.moxiecode.com</echo>
<!-- Compress development package -->
<delete file="${temp_dir}/tinymce_compressor_${type}_${file_version}.zip" quiet="true" />
<zip destfile="${temp_dir}/tinymce_compressor_${type}_${file_version}.zip">
<zipfileset dir="${temp_dir}/tinymce_compressor_${type}" prefix="tinymce_compressor_${type}">
<include name="tiny_mce_gzip.${ext}"/>
<include name="changelog.txt"/>
<include name="readme.txt"/>
</zipfileset>
</zip>
</target>
<target name="php">
<antcall target="build">
<param name="type" value="php"/>
<param name="ext" value="php"/>
</antcall>
</target>
<target name="net">
<antcall target="build">
<param name="type" value="net"/>
<param name="ext" value="aspx"/>
</antcall>
</target>
<target name="jsp">
<antcall target="build">
<param name="type" value="jsp"/>
<param name="ext" value="jsp"/>
</antcall>
</target>
<target name="cf">
<antcall target="build">
<param name="type" value="cf"/>
<param name="ext" value="cfm"/>
</antcall>
</target>
<target name="perl">
<antcall target="build">
<param name="type" value="perl"/>
<param name="ext" value="pl"/>
</antcall>
</target>
<target name="all" depends="php,net,jsp,cf,perl"></target>
</project>
Jump to Line
Something went wrong with that request. Please try again.