Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <target name="compress" depends="-fix-config, list-profile-deps"
- description="runs compression code over release JS files">
- <echo>profileFile: ${profileFile}</echo>
- <!-- Create the release dir if it doesn't exist. -->
- <mkdir dir="${release_dir}"/>
- <!-- write the list of files included to the release directory -->
- <echo file="${release_dir}/build.txt">
- Files baked into this package:
- ${profileDeps}
- </echo>
- <!-- now write 'em all to a single file -->
- <concat fixlastline="yes" eol="crlf" destfile="${release_dir}/source.__package__.js">
- <!--
- <concat fixlastline="yes" eol="crlf" destfile="${release_dir}/dojo.js">
- -->
- <filelist
- dir="."
- files="${profileDeps}" />
- </concat>
- <!--
- clobber requireIf and requireAfterIf statements since they
- aren't applicable in build
- -->
- <replaceregexp match="dojo.requireIf\((.*?)\);"
- byline="true" flags="g" file="${release_dir}/source.__package__.js">
- <substitution expression=""/>
- </replaceregexp>
- <replaceregexp match="dojo.requireAfterIf\((.*?)\);"
- byline="true" flags="g" file="${release_dir}/source.__package__.js">
- <substitution expression=""/>
- </replaceregexp>
- <!-- Set the version number -->
- <script language="jython"><![CDATA[
- import sys
- # make the python standard library avialable
- sys.path.append("lib/pyLib.zip")
- sys.path.append(".")
- # import re
- import os
- from buildUtil import *
- print "Setting version for Dojo to: " + dojo.getProperty("version")
- replaceVersion(dojo.getProperty("release_dir") + "/source.__package__.js", dojo.getProperty("version"))
- print "Removing dojo.require calls in source.__package__.js."
- removeRequires(dojo.getProperty("release_dir") + "/source.__package__.js")
- ]]></script>
- <antcall target="-rhino-compress">
- <param name="srcFile" value="${release_dir}/source.__package__.js" />
- <param name="dstFile" value="${release_dir}/dojo.js" />
- </antcall>
- <antcall target="-no-rhino-compress">
- <param name="srcFile" value="${release_dir}/source.__package__.js" />
- <param name="dstFile" value="${release_dir}/dojo.js" />
- </antcall>
- <!--
- <java jar="./lib/custom_rhino.jar" fork="true" output="${release_dir}/__package__.js">
- <arg value="-c" />
- <arg value="${release_dir}/source.__package__.js" />
- </java>
- -->
- <!-- add build notice -->
- <replaceregexp match="^" byline="false" replace="${build_notice}">
- <fileset dir="${release_dir}" includes="dojo.js"/>
- </replaceregexp>
- <!-- add copyright notice -->
- <replaceregexp match="^" byline="false" replace="${copyright}">
- <fileset dir="${release_dir}">
- <include name="**/*.js" />
- <include name="**/*.as" />
- <not>
- <contains text="copyright" casesensitive="no" />
- </not>
- </fileset>
- </replaceregexp>
- <delete file="${release_dir}/source.__package__.js"/>
- <!-- we copy over iframe_history.html here just in case this is a truly
- stand-alone build that isn't being kicked off via release -->
- <copy file="../iframe_history.html" todir="${release_dir}/" />
- <replaceregexp match="\t" flags="g" replace=" ">
- <fileset dir="${release_dir}">
- <include name="dojo.js"/>
- <include name="dojo.js.uncompressed.js"/>
- </fileset>
- </replaceregexp>
- </target>
Add Comment
Please, Sign In to add comment