core: ant build - add Date and Revision to to header (just like make build)
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 18 Jan 2009 13:30:09 +0000 (13:30 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 18 Jan 2009 13:30:09 +0000 (13:30 +0000)
build.xml
build/ant-contrib-0.6.jar [new file with mode: 0644]

index 6a6c7ca..dca99f4 100644 (file)
--- a/build.xml
+++ b/build.xml
     <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
     <property name="JQ_PACK" value="${DIST_DIR}/jquery.pack.js" />
        <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 -->
 
@@ -49,6 +64,8 @@
             <fileset dir="${SRC_DIR}" includes="outro.js" />
         </concat>
        <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." />
     </target>
 
diff --git a/build/ant-contrib-0.6.jar b/build/ant-contrib-0.6.jar
new file mode 100644 (file)
index 0000000..db90b0a
Binary files /dev/null and b/build/ant-contrib-0.6.jar differ