core: ant build - add Date and Revision to to header (just like make build)
This commit is contained in:
parent
2f536b3d4d
commit
cde93dc547
17
build.xml
17
build.xml
|
@ -30,6 +30,21 @@
|
||||||
<property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
|
<property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
|
||||||
<loadfile property="version" srcfile="version.txt" />
|
<loadfile property="version" srcfile="version.txt" />
|
||||||
|
|
||||||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="build/ant-contrib-0.6.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</taskdef>
|
||||||
|
<exec executable="svn" outputproperty="svnlog.out" >
|
||||||
|
<arg line="info ."/>
|
||||||
|
</exec>
|
||||||
|
<propertyregex property="revision" input="${svnlog.out}" select="\1">
|
||||||
|
<regexp pattern="Revision: ([0-9]*)"/>
|
||||||
|
</propertyregex>
|
||||||
|
<propertyregex property="date" input="${svnlog.out}" select="\1">
|
||||||
|
<regexp pattern="Date: (.+\))"/>
|
||||||
|
</propertyregex>
|
||||||
|
|
||||||
<!-- MAIN -->
|
<!-- MAIN -->
|
||||||
|
|
||||||
<target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
|
<target name="jquery" description="Main jquery build, concatenates source files and replaces @VERSION">
|
||||||
|
@ -49,6 +64,8 @@
|
||||||
<fileset dir="${SRC_DIR}" includes="outro.js" />
|
<fileset dir="${SRC_DIR}" includes="outro.js" />
|
||||||
</concat>
|
</concat>
|
||||||
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
|
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" />
|
||||||
|
<replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" />
|
||||||
|
<replaceregexp match="Revision: " replace="Revision: ${revision}" file="${JQ}" />
|
||||||
<echo message="${JQ} built." />
|
<echo message="${JQ} built." />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
BIN
build/ant-contrib-0.6.jar
Normal file
BIN
build/ant-contrib-0.6.jar
Normal file
Binary file not shown.
Loading…
Reference in a new issue